Hours from Signup to First Project

For users who created at least one project, compute the average and maximum number of hours between their signup event and their first create_project event, by acquisition channel.

Expected output

acquisition_channel, users, avg_hours, max_hours (both rounded to 1 decimal). Sorted by avg_hours ascending.

Row order is checked. Column names are not checked; numbers are compared to 2 decimals.

Dataset: B2B SaaS product events

A project-management SaaS: company accounts, their users, product event logs (Jan to Apr 2026) and subscription history.

accounts

One row per customer company.

account_idINTEGERprimary key
companyTEXT
industryTEXT
countryTEXT
created_atTEXTYYYY-MM-DD
users

One row per user. Every user belongs to one account.

user_idINTEGERprimary key
account_idINTEGER
signup_dateTEXTYYYY-MM-DD, same day as the user's signup event
acquisition_channelTEXTorganic, paid_search, referral or partner
countryTEXT
events

Product event log. Data ends on 2026-04-30.

event_idINTEGERprimary key, increases with event_time
user_idINTEGER
event_nameTEXTsignup, login, view_dashboard, export_report, create_project, invite_teammate, upgrade_click
event_timeTEXTYYYY-MM-DD HH:MM:SS (UTC)
subscriptions

Paid subscription periods per account. An account with no rows is on the free plan.

subscription_idINTEGERprimary key
account_idINTEGER
planTEXTteam or business
mrrREALmonthly recurring revenue in USD
started_atTEXTYYYY-MM-DD, inclusive
ended_atTEXTYYYY-MM-DD, exclusive; NULL while active. May be in the future for a scheduled cancellation.

Engine: SQLite. Dates are text (YYYY-MM-DD); use strftime(), date() and julianday() for date math.

Related problems

SQLite · runs in your browser
Ctrl/⌘ + Enter to run
Expected output preview (4 rows, order matters)
acquisition_channelusersavg_hoursmax_hours
organic2417.7233.6
referral1521233.7
paid_search1532.7233.5

Showing 3 of 4 rows.

Hints

Worked solution

Run at least one query to unlock it.