Real-world recipes · Product analytics

Conversion funnel

In Excel, you'd reach for
fxCOUNTIFS for each step, then dividing by the first

A funnel counts how many people reach each step: signed up, created a report, shared one, invited a teammate. Count each person once per step with COUNT(DISTINCT ...), and divide by the first step to get conversion.

Try itEdit the query, then Run
signed_upcreated_reportshared_reportinvited_teammate
42027119166

1 row

A CASE with no ELSE returns empty for rows that don't match, and COUNT skips empties. That's what makes one pass over the table count all four steps at once.

Your turn

What percentage of customers who signed up went on to created_report? Return one number called pct, rounded to 1 decimal.

This page on one card

Conversion funnel: the Excel way (COUNTIFS for each step) and the SQL query, side by side
Conversion funnel, on one card: the Excel way and the SQL. Download · Save to Pinterest
The practice data (7 tables)

See every column and sample rows