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

One more to go!

Exercise

For each ticket, show its Id, Price, and a column named Ratio. The ratio is the ticket price divided by that sum of all tickets purchased on the same journey. Round the Ratio to two decimal places.

Stuck? Here's a hint!

To avoid integer division, use CAST(Price AS NUMERIC). Use the ROUND() function to round the result.