1. Learn
  2. /
  3. Projects
  4. /
  5. Applying SQL to Real-World Problems

Connected

Exercise

The average length of films by category

From the previous exercise you've learned that the tables film and category have the necessary information to calculate the average movie length for every category. You've also learned that they share a common field film_id which can be used to join these tables. Now you will use this information to query a list of average length for each category.

Instructions

100 XP
  • Calculate the average length and return this column as average_length.
  • Join the two tables film and category.
  • Ensure that the result is in ascending order by the average length of each category.