Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
PARTITION BY
11. OVER(PARTITION BY) – practice 3
Summary

Instruction

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

Exercise

For each ticket, show its id, price and, the column named ratio. The ratio is the ticket price to the sum of all ticket prices purchased on the same journey.

Stuck? Here's a hint!

In order to avoid integer division, you can write price::numeric.