Welcome to the SQL screen.
The question is on your right: Compare ChatGPT Acquisition Performance. Read through the requirements and the four tables first.
Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?
At NovaNote, the growth team wants to compare users acquired through ChatGPT against users from all other acquisition channels. Write a PostgreSQL query to produce a cohort-style comparison for users who signed up in January 2024.
ChatGPT if acquisition_channels.channel_name = 'ChatGPT'Other for every other non-null channelchannel_id is NULL| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| signup_date | DATE | Date the user created an account |
| channel_id | INT | Acquisition channel tied to the signup |
| country_code | VARCHAR(2) | Two-letter country code |
| Column | Type | Description |
|---|---|---|
| channel_idPK | INT | Unique channel identifier |
| channel_name | VARCHAR(50) | Name of the acquisition channel |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| user_id | INT | User who generated the event |
| event_name | VARCHAR(50) | Type of event |
| event_date | DATE | Date the event occurred |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| user_id | INT | User who placed the order |
| order_date | DATE | Date the order was placed |
| amount_usd | DECIMAL(10,2) | Order amount in USD |