On June 18th at 10:00 AM UTC Academy will be unavailable for 5 minutes due to planned maintenance break.
Rainbow Deals - 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 practise exercises.

Exercise

For each journey, show its Id, the ProductionYear of the train on that journey, the number of journeys that train made (as TrainJourneys) and the number of journeys on that same route (as RouteJourneys).

Stuck? Here's a hint!

Use COUNT(Journey.Id) twice, but with a different OVER(PARTITION BY) clause. Join two tables.