Meta tracks retained users: people active in a month who were also active in the previous calendar month. Only the actions 'login', 'like' and 'comment' make a user active; 'page_view' does not. Several actions in the same month still count as one active user. Write an SQL query that returns active_month (formatted as 'YYYY-MM') and retained_users for June, July and August 2025. Order the results by active_month ascending.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.