Instruction
Excellent! Let's do another exercise for further practice.
Exercise
For each aircraft, show its id as aircraft_id and calculate the average distance (call it average) covered on all its routes. Only take into account those aircrafts which were launched before January 1, 2014 and took more than 1 flight.
Stuck? Here's a hint!
- Use
AVG(x)to find the average value ofx. - Remember the proper date format and use apostrophes:
'YYYY-MM-DD'. - You can use
HAVINGwithCOUNT(x)afterGROUP BYto satisfy the condition for more than 1 flight.



