Instruction
Very good! Let's do another exercise for practice.
Exercise
For each aircraft, show its ID number (as aircraft_id) and calculate the average distance covered on all its routes, and name it avg_distance. Only show data for aircraft that were launched before January 1, 2014, and took more than one flight.
Stuck? Here's a hint!
- Use
AVG(x)to find the average value ofx. - Use
HAVING COUNT(...) > ...afterGROUP BYfor the "more than one flight" condition.



