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()
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 where WebsiteId = 2, show the Day, the RPM and the RPM seven days later. Rename the columns to RPM and RPM7.

Stuck? Here's a hint!

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