Back to problems

Build a cohort dashboard with Streamlit and SQL

SQL · Snowflake · Medium

You are handed three PostgreSQL tables — users, events, purchases — and asked to give a product manager a small Streamlit tool for exploring weekly cohort retention and ARPU across countries. Deliver the analytics SQL first, then the thin front end. Treat the reporting date as 2025-10-06 00:00:00 UTC, and assume every week bucket starts on Monday. A BigQuery Standard SQL port of the same logic is welcome as long as you note the equivalent date helpers. Week arithmetic:…

Checking your access…