Introduction
LEAD and LAG
FIRST_VALUE, LAST_VALUE, NTH_VALUE
24. Practice 3
Revision

Instruction

Great! The last exercise ahead of you.

Exercise

For each statistics row of website_id = 3, show the day, the number of clicks on that day and a ratio expressed as percentage: the number of clicks on that day to the greatest number of clicks on any day. Round the percentage to integer values.

Stuck? Here's a hint!

To avoid integer division, use CAST(clicks AS numeric). Also, use ROUND() to round the percentage.

Console

Code editor

Result

TableConsole