It's Autumn! Prices fall like leaves! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
PARTITION BY
9. OVER(PARTITION BY) – practice 1
Summary

Instruction

Fantastic. Let's do a couple of exercises to practice.

Exercise

For each journey, show its id, the production_year of the train on that journey, the number of journeys the train took and the number of journeys on the same route.

Stuck? Here's a hint!

Use COUNT(journey.id) twice, but with different OVER(PARTITION BY) clause. Join two tables.