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(CustomerID) AS RegistrationCount2016
WHERE RegistrationDate >= '20160101'
AND RegistrationDate < '20170101';
The query is quite simple. Just remember proper time filtering: use the
'yyyymmdd' format (year, month, day) when you write the dates.