“Well, the hype is going down”, said Gessica, “I see fewer articles and tweets about Bindle, we should think about starting a marketing department. Let’s see how many users signed up for Bindle within the first week after the website’s launch.”
Finally, we can calculate how many signups Bindle had within the first week after launch. A couple of reminders:
We’ve just learned how to combine filters. We can get the correct answer by writing a query that translates to “Count all user records which has signup date greater than 1 Jan 2018 and less than 7 Jan 2018”.
Remember inclusive and non-inclusive comparison operators:
signup_date < '2018-01-07'
won’t count signups for the 7th of January (less than < operator is non-inclusive).
SELECT
COUNT(*)
FROM users
WHERE
signup_date >= '2018-01-01'
AND signup_date <= '2018-01-07'
Hi, it’s Anatoli, the author of SQL Habit.
SQL Habit is a course (or, as some of the students say, “business simulator”). It’s based on a story of a fictional startup called Bindle. You’ll play a role of their Data Analyst and solve real-life challenges from Business, Marketing, and Product Management.
SQL Habit course is made of bite-sized lessons and exercises (you’re looking at one atm). They always have a real-life setting and detailed explanations. You can immediately apply everything you’ve learned at work.