SQL: Table Transformation 4/7 Non-Correlated Subqueries III


#1


No error message, just not letting me pass and not giving me a green check mark in the instructions.

Replace this line with your code.
 
SELECT dep_month,
			 dep_day_of_week,
      AVG(flight_distance) AS average_distance   
FROM (
			SELECT dep_month,
						dep_day_of_week,
						  SUM(distance) AS flight_distance
  				FROM flights
			GROUP BY 1,2
) AS flight_distance
GROUP BY 1,2;