Let's start with customer acquisition. We'll begin by counting how many new registrations occurred in a given period. By observing how the registration count changes over time, we'll be able to assess whether our promotional campaigns have worked or not.
We'll discuss the following reports:
- The number of registrations in the given period.
- The number of registrations in the current period of time (current week, current month, etc.).
- The number of registrations over time, tallying registrations in each month or in each week.
To count the number of registrations in 2016, we can use the following query:
SELECT COUNT(customer_id) AS registration_count_2016
WHERE registration_date >= '2016-01-01'
AND registration_date < '2017-01-01';
The query is quite simple. Just remember proper time filtering: use the
'yyyy-mm-dd' format (year, month, day) when you write the dates.