Quick Commerce Analytics Path · Mission 3 of 25Easy

Customer acquisition by month

Bucket a date column into months with DATE_TRUNC and COUNT new customers per month. The acquisition curve every growth team watches.

Back to Quick Commerce Analytics

The Brief

Hannah KimGrowth Leadgrowth

Board update tomorrow. I need our customer acquisition curve: new customers by signup month. dim_customers has a signup_date. Truncate it to month, count signups, two columns: signup_month, new_customers. ORDER BY signup_month.

You'll practice

date_truncCOUNTGROUP BY

Tables & columns available

dim_customersdim8 columns
ColumnTypeKey
customer_idINTPK
emailTEXT
first_nameTEXT
last_nameTEXT
cityTEXT
stateTEXT
signup_dateTEXT
acquisition_channelTEXT

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

dim_customers.signup_date is a TEXT date; cast it to a timestamp before truncating.

Hint 2

DATE_TRUNC('month', signup_date::timestamp) groups every signup into its month.

Hint 3

COUNT(*) per month, alias new_customers, ORDER BY signup_month ascending.