SQL for data analysts: the intensive course
Six case studies from an online shop, the kind every analytics team works on: headline KPIs, a cohort matrix, a conversion funnel, an ABC analysis, moving averages and a data quality report, one query at a time.
In short: this course picks up where the SQL course leaves off. Instead of single commands you answer whole business questions. How many new customers come back? Where do visitors drop out of the checkout? Which products make up 80% of revenue? The server checks every query against hidden data as well, so typed-in results won't pass.
Who the course is for
Anyone who analyzes data and is tired of pulling an export into a spreadsheet every time: junior data analysts, finance and sales staff with database access, marketers with a shop back end, and career changers preparing for a data analyst role. You should be comfortable with SELECT, WHERE, GROUP BY and JOIN. Window functions and WITH come up throughout the cases; the basics are in the lessons on CTEs and window functions.
The practice database
Every case uses the same made-up online store selling kitchenware. The data runs from November 2025 to October 2026, and amounts are net with no currency attached, so they read just as well in dollars or pounds. Like any real export, it contains a few errors, and you'll track them down in the last case.
| Table | Contents | Key columns |
|---|---|---|
| customers | 70 registered customers | customer_id, name, email, city, signup_date, channel |
| orders | 122 orders with status and order value | order_id, customer_id, order_date, status, amount |
| order_items | the lines of each order | item_id, order_id, product_id, quantity, unit_price |
| products | 24 products in 6 categories | product_id, name, category, price |
| sessions | 90 visits to the shop, 1 to 14 October 2026 | session_id, session_date, device, channel |
| events | clicks during those visits | event_id, session_id, event_time, step |
One rule holds across all cases: an order counts unless its status is cancelled. That's the kind of definition a real team agrees once and then applies everywhere.
What you'll be able to do
- calculate revenue, average order value and active customers per year, month and channel without a join quietly doubling the numbers;
- turn a click log into a funnel with step conversion rates and compare devices;
- run an ABC analysis with revenue share, cumulative share and classes in plain SQL;
- analyze monthly series with month-over-month change, a moving average and year-to-date totals;
- assign customers to cohorts and build a cohort matrix with repeat purchase rates;
- check a table for duplicates, missing values and totals that don't add up before you report on it.
The six cases
Each case is a little harder than the one before, and the order follows a typical analysis: headline numbers first, then visitors and products, then change over time, first as a monthly series and then by customer cohort, and finally the question of whether the data can be trusted at all.
- KPI overview: revenue, average order value and customers for the year, by month and by signup channel.
- Order funnel: sessions per step, conversion by device and step rates with LAG.
- ABC analysis: revenue per product, shares, cumulative share and classes A, B and C.
- Time series and trends: month-over-month change, moving average and year-to-date revenue.
- Cohort analysis: cohorts by first order, repeat rate and a cohort matrix.
- Data quality checks: duplicates, totals that don't match and a one-row check report.
Each case has three tasks that build on each other. Above every task you see the tables with all their rows. "Run" lets you try intermediate steps, and "Check" compares your result with the model answer.
Prerequisites
Levels 1 to 3 and 5 of the SQL course are recommended: filtering, grouping, LEFT JOIN, subqueries, WITH and window functions. They aren't required. Wherever a case needs a technique it links to the lesson, and the hints on each task lead you to the answer in three steps.
The certificate
The course comes with its own certificate, "SQL for data analysis". You earn it by solving every case task, at least 80% of them without revealing the answer. The server checks your queries, including against the hidden variant data. The certificate shows your name, the date and the list of cases, and it has a public verification link you can add to a job application or LinkedIn. It's part of Premium and needs a confirmed email address; you can try the first task of every case for free. It's a LearnThisNext certificate, not a certification from a database vendor.
Your progress and the certificate form are in the course view in your account. SQL courses for other roles are listed under SQL intensive courses.
FAQ
How much SQL does a data analyst need?
Fewer building blocks than you might think, but you need them to be solid: filtering and grouping, JOIN and LEFT JOIN, CASE, date functions, WITH and window functions such as LAG, SUM OVER and ROW_NUMBER. These are exactly the pieces that keep coming back across the six cases, each time on a different question.
Which database do the exercises use?
They run on SQLite on our server, so there's nothing to install. Every case page ends with the differences in MySQL, PostgreSQL and SQL Server, for example in date functions or in integer division.
How long does it take?
That depends on your experience. There are six cases with three tasks each and no time limit. Your progress is saved, so you can stop and pick up again whenever you like.
Is the data real?
No. Customers, orders and visits are made up, and the names don't belong to real people. The data is designed so that the usual patterns and errors of real shop data show up in it.
Can my query look different from the model answer?
Yes. The check compares results, not query text. Whether you use WITH, a subquery or a window function is up to you, as long as the columns and values match.