SQL Quest

Lessons, hints, explained solutions, the in-browser PostgreSQL editor and practice answer checks in your browser are available. Graded assessments, recorded progress from answer checks and new certificates aren't available yet.

SQL for Data Analytics and Business Intelligence

This track is about the work between a business question and a dashboard people can trust. You will work mostly in the Wadi Market analytics mart, a star schema with a Saudi date dimension, a customer dimension that keeps history, and facts for sales, web sessions and marketing spend, and in Mizan Cloud’s subscription data. You will learn to fix the question, the grain and the period before writing SQL; define KPIs with explicit numerators and denominators; join facts and dimensions safely and combine facts through conformed dimensions; choose between point-in-time and current attributes; build conversion funnels, churn rates and MRR bridges; estimate customer lifetime value honestly; run data-quality checks and reconciliations before publishing; and deliver documented, BI-ready views.

Lessons

  1. Designing an analytical queryTurn a vague dashboard request into a precise question, a declared grain and a query you can verify.20 min · 4 exercisesFree
  2. Defining KPIs preciselyWrite a KPI as numerator, denominator, filters and period, then implement exactly that definition in SQL.22 min · 4 exercises Members
  3. Star schemasHow a reporting database is organised into fact tables and dimensions, joined on surrogate keys, and shared across facts.22 min · 4 exercises Members
  4. Working with facts and dimensionsAdditive, semi-additive and non-additive measures, the date dimension, and reporting days that had no facts at all.22 min · 4 exercises Members
  5. Slowly changing dimensionsKeep history in a dimension, and choose between attributes as they were at the time of a fact and as they are today.24 min · 5 exercises Members
  6. Funnel analysisCount how many visitors reach each step of a journey, compute step and overall conversion, and keep the population honest.24 min · 4 exercises Members
  7. Retention, churn and MRR movementsMeasure who stays and who leaves in a subscription business: logo churn, revenue churn and the MRR bridge.28 min · 4 exercises Members
  8. Customer lifetime valueCompute historical and cohort-based customer value, a simple predictive estimate, and the caveats that come with each.24 min · 4 exercises Members
  9. Data-quality checks before publishingTest row counts, grain, keys, nulls and totals before a number leaves your hands.24 min · 5 exercises Members
  10. Building BI-ready datasetsShape a reporting dataset with one declared grain, clear names, explicit measures and handled special cases, and publish it as a view.26 min · 4 exercises Members
  11. Documenting analytical queriesMake a query explain itself: a header with purpose, grain and assumptions, named CTE steps, comments on the why, and database comments on published views.20 min · 4 exercises Members