In this exercise, I do not understand the answer for this answer. Below is the correct code.
AVG(a.flight_count) AS average_flights
COUNT(*) AS flight_count
GROUP BY 1,2,3
GROUP BY 1,2
ORDER BY 1,2;
I don't understand:
1) the 'a' in a.dep_month and a.dep_of_week
2) GROUP BY 1,2,3 --- why 1 2 3? What does that mean? In the previous SQL exercise it was grouped in categories such as price, etc.
3) ORDER BY 1, 2 --- I also don't quite get this.
4) And the 'a' at the end of the closing bracket. What does that 'a' do? Why is it there?
I am struggling with this particular problem because it doesn't really explain why these are there. Please help me. Thank you.