1.Using a subquery, find the average total distance flown by day of week and month.
Be sure to alias the outer query as average_distance and the inner query as flight_distance.
Why is my code not working?
my code based on class:
AVG(a.flight_distance) AS average_distance
sum(distance) AS flight_distance
GROUP BY 1,2,3
GROUP BY 1,2
ORDER BY 1,2;