Skip to interview prep
Apexed

Next-day activity after signup

AnalyticsHard

For each signup date, return signup_day, signups and retained: how many of those users had any event on the following day. Order by signup_day.

Tables

  • events: user_id, event (signup | view | cart | purchase), happened_on

Row order is checked. Column names do not have to match, but the number of columns and the values do.

Tab indents · Ctrl/⌘ + Enter runs · Esc then Tab leaves the editor

Run your query. It is checked against the expected result on the same data.

Solution

Queries run only in your browser on a private SQLite database (sql.js from a public CDN). Nothing is sent to Apexed.

Next-day activity after signup: SQL interview practice — Apexed