AVG(a.flight_count) AS average_flights
COUNT(*) AS flight_count
GROUP BY 1,2,3
GROUP BY 1,2
ORDER BY 1,2;
- Why is there an “a.” infront of the column names in the outer query?
- GROUP BY “1,2,3” seems to group by the three columns based on the order they were written in the inner query. Is that correct? Same applies to GROUP BY “1,2” in the outer query