Skip to content
RED SAGSkills
easy15 ptsDatesGroup By

Monthly Signup Counts

signups records when each user created an account (signed_up_at is an ISO datetime string).

Count signups per calendar month. Format the month as YYYY-MM. Months with no signups do not need to appear.

Return columns month, signups. Order by month ascending.

Schema

CREATE TABLE signups (
  user_id INTEGER PRIMARY KEY,
  signed_up_at TEXT NOT NULL,
  channel TEXT
);

Sample data

signups

user_idsigned_up_atchannel
12026-01-04 10:22:00ads
22026-01-19 18:05:00organic
32026-02-01 00:00:00ads
42026-02-14 12:40:00referral
52026-02-28 23:59:59organic
62026-04-02 08:15:00ads
Hint 1

strftime('%Y-%m', ts) turns a timestamp into its year-month.

Hint 2

July 2024 and July 2025 are different months, so keep the year in the key.

Good practice for: Data Analyst, Product Manager, Business Analyst, Digital Marketing Specialist

SQL (SQLite)

Run checks your query on the sample data (Ctrl + '). Submit also checks hidden databases.