Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Final Quiz
2. Question 1

Instruction

Question 1 is all about customer acquisition.

Exercise

Create a report that compares the number of acquired customers in weekly registration cohorts across selected channels. Remember, this is during the first quarter of 2017. Show the following columns:

• registration_week
• direct_count (the number of customers from the 'Direct' channel in the given cohort).
• social_count (the number of customers from the 'Social' channel in the given cohort).
• referral_count (the number of customers from the 'Referral' channel in the given cohort).

Order the results by week.

Stuck? Here's a hint!

Join the customers and channels tables to get the channel names.

Use the COUNT(CASE WHEN ...) construction to count the customers from each channel.

Use the DATE_PART() function to extract the week of registration.