SQL retention cohort query (Postgres)
Category: code
Prompt
Write a PostgreSQL 16 query that produces a weekly retention cohort grid for a users + events table (events has user_id, event_type, created_at). Columns: cohort_week, week_0..week_12 as percentages.
Rubric
Correct cohort logic, efficient (uses generate_series), readable CTE layout.
No output receipts have been published for this prompt yet. Check back soon.