Introduction
PARTITION BY
10. OVER(PARTITION BY) – practice 2
Revision

Instruction

Another correct answer. Let's do the third exercise now.

Exercise

For each ticket, show its id, price, date of its journey, the average price of tickets sold on that day and the number of tickets sold on that day. Exclude journeys with train_id = 5.

Console

Code editor

Result

TableConsole