This problem needs fixing!
1.The question asks for the average distance flown by day and by month. It is not clear what is being asked. I took it to ask for average distance flow on all Mondays etc… and then average distance flown all Januaries… etc.
- I also don’t understand why the code groups by dep_date along with dep_month and day columns. It seems redundant, but when only grouping by dep_date, I get a different average. Am I missing something here?
sum(distance) AS flight_distance
GROUP BY 1,2,3 --why group by all three columns?
I tried converting the date to show only month and see the if there are any discrepancies but the date is input as text which is annoying. I hope future lessons show how to convert this to datetime.