Every SaaS team wants to know where users drop off. Which step in your onboarding flow loses half your signups? At what point in checkout do customers abandon their cart? Funnel analysis answers these questions but traditionally, getting those answers meant writing multi-step SQL, joining several tables, and hoping you remembered to filter out test accounts.
If you don't know SQL, you've been waiting for an engineer to run it for you. This guide shows how to get funnel insights directly from your database without writing a single query.
What Funnel Analysis Actually Needs from Your Database
Before jumping into the how, it helps to understand what makes funnel queries challenging. A basic funnel tracks users moving through a sequence of steps say, signed_up → completed_onboarding → made_first_purchase. For each step, you want to know:
In SQL, this typically requires a series of CTEs (Common Table Expressions) or subqueries that join your users table with your events table, filter by event type, deduplicate, and calculate conversion rates. Something like:
WITH step1 AS (
SELECT DISTINCT user_id
FROM events
WHERE event_name = 'signed_up'
AND created_at >= '2026-01-01'
),
step2 AS (
SELECT DISTINCT e.user_id
FROM events e
INNER JOIN step1 s1 ON e.user_id = s1.user_id
WHERE e.event_name = 'completed_onboarding'
AND e.created_at >= '2026-01-01'
),
step3 AS (
SELECT DISTINCT e.user_id
FROM events e
INNER JOIN step2 s2 ON e.user_id = s2.user_id
WHERE e.event_name = 'made_first_purchase'
AND e.created_at >= '2026-01-01'
)
SELECT
(SELECT COUNT(*) FROM step1) AS signups,
(SELECT COUNT(*) FROM step2) AS onboarded,
(SELECT COUNT(*) FROM step3) AS purchased,
ROUND(100.0 * (SELECT COUNT(*) FROM step2) / NULLIF((SELECT COUNT(*) FROM step1), 0), 1) AS signup_to_onboard_pct,
ROUND(100.0 * (SELECT COUNT(*) FROM step3) / NULLIF((SELECT COUNT(*) FROM step2), 0), 1) AS onboard_to_purchase_pct;That's a lot of code to ask a non-technical team member to write. And it has to be modified every time you want to look at a different date range, a different event sequence, or a different user segment.
Asking Your Funnel Questions in Plain English
With a natural language database interface, you ask the same question the way you'd phrase it to a colleague:
"How many users signed up in Q1 2026, then completed onboarding, then made their first purchase? Show me the conversion rate at each step."
The AI translates this to SQL, runs it against your database, and returns the numbers usually with a breakdown table showing each step's count and drop-off percentage.
AI for Database connects directly to your PostgreSQL, MySQL, or other database and handles this translation. You don't paste schema context into a chat window and hope for the best the tool has already read your schema, knows your table and column names, and builds accurate queries from your plain-English question.
For a question like "show me our signup-to-activation funnel for January, broken down by signup source," it will:
users and events, or whatever your schema uses)Common Funnel Questions You Can Ask Right Now
Here are the kinds of questions that work well against typical SaaS databases:
Onboarding funnels:
Activation funnels:
Purchase funnels:
Trial-to-paid conversion:
Each of these would require a moderately complex SQL query. Asking them in plain English takes seconds.
Segmenting Your Funnel
One of the most valuable things about funnel analysis is cutting it by segment geography, acquisition channel, plan type, user persona. In traditional tools, adding a segment means rewriting the query. In plain-English interfaces, you just add it to your question.
For example:
Example of what gets generated for a segmented funnel
SELECT
u.signup_source,
COUNT(DISTINCT u.id) AS signed_up,
COUNT(DISTINCT CASE WHEN e.event_name = 'onboarding_completed' THEN u.id END) AS onboarded,
COUNT(DISTINCT CASE WHEN e2.event_name = 'first_purchase' THEN u.id END) AS purchased,
ROUND(100.0 * COUNT(DISTINCT CASE WHEN e.event_name = 'onboarding_completed' THEN u.id END) /
NULLIF(COUNT(DISTINCT u.id), 0), 1) AS onboard_rate
FROM users u
LEFT JOIN events e ON u.id = e.user_id AND e.event_name = 'onboarding_completed'
LEFT JOIN events e2 ON u.id = e2.user_id AND e2.event_name = 'first_purchase'
WHERE u.created_at BETWEEN '2026-01-01' AND '2026-03-31'
GROUP BY u.signup_source
ORDER BY signed_up DESC;You don't write this. You ask "show me the signup-to-purchase funnel by acquisition channel for Q1 2026" and get it back as a table.
Building a Funnel Dashboard That Refreshes Automatically
Running a one-off funnel query is useful. Having a funnel dashboard that updates every morning is better.
AI for Database lets you save funnel queries as dashboard panels that refresh on a schedule. You set up your onboarding funnel once, set it to refresh daily, and every morning your team sees the current numbers without anyone running anything manually.
This is particularly useful for weekly standups and growth reviews. Instead of someone pulling numbers before each meeting, the dashboard is always current. You can share the link with the whole team no database access required, no SQL knowledge needed.
When AI Gets the Funnel Wrong (and How to Fix It)
Natural language is imprecise. "Users who completed onboarding" could mean different things depending on your schema did they fire an event, fill a column, or reach a specific page? The AI makes its best guess based on your schema and the question you asked.
If the numbers look wrong, the fix is usually to be more specific:
onboarding_completed_at column is not null"orders table with status = 'completed'"The more precise your question, the more accurate the query. And once you've run a query that returns the right numbers, you can save it to your dashboard that exact query, not a re-interpreted version.
Funnel Analysis Across Multiple Tables
Real databases rarely have everything in one table. A typical setup might have:
users basic profile and signup infosessions each time a user logs inevents granular actions within a sessionsubscriptions plan changes and billing eventsorders purchase historyA funnel that spans from "signed up" (in users) to "placed first order" (in orders) requires joining across tables. Natural language tools handle this if your schema has proper foreign keys the AI sees the relationships and writes the join correctly.
If your schema doesn't have explicit foreign keys (common in PostgreSQL where they're optional), you may need to be explicit: "join users to orders on users.id = orders.user_id." Once you've asked correctly and gotten the right result, save it.
Practical Setup for Your First Funnel Query
If you want to start today:
You now have a live funnel dashboard with zero SQL written by hand.
Getting Funnel Insights Is Now a Business Question, Not a Technical One
Funnel analysis used to require a data analyst or an engineer with the time to write the queries. The insights existed in your database getting them out required a specific technical skill.
Natural language database querying removes that dependency. Your product manager can ask "where are users dropping off in the trial flow?" and get an answer directly, without filing a ticket or waiting for a dashboard that was built weeks ago for a different question.
If your database has the data, the answer is a question away. Try AI for Database free at aifordatabase.com.