Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
LEAD and LAG
13. Practice 1
FIRST_VALUE, LAST_VALUE, NTH_VALUE
Summary

Instruction

Ok, let's do two more analytical exercises for practice.

Exercise

RPM (revenue per thousand impressions) is defined as the revenue divided by the number of impressions, times 1000.

RPM = (revenue / number of impressions) * 1000

For each statistics row with website_id = 2, show the day, the RPM and the RPM 7 days later. Rename the columns to RPM and RPM_7.

Stuck? Here's a hint!

Note that the revenue column is already of the numeric type, so you don't need to cast it.