Start here
Lessons and reference
Look things up
Start here
SQL
Power Query
Data modeling
Power BI and DAX
Finance playbooks
Run queries
Build and check
Six short stories, each with a live chart built from a real query on the sample data and the SQL underneath.
Each one is a short business question in plain words.
The chart is drawn from a live query on the sample data.
The query is shown under each chart so you can learn from it.
Each story starts with a question a business person would ask, then shows a chart built from a real query on one of the free sample databases. The chart and the SQL are both on the page, so you can see exactly how the numbers were made. The stories use the SQL Server versions of the queries.
The sentences describe what the chart shows, not exact figures. The sample dates move forward every day, so the wording keeps to shapes and rankings, such as which month peaks or which bucket is largest, rather than specific days or totals that change with the calendar.
The sales story looks at how a wholesaler's revenue arrives across months. The customer story asks whether a small group of customers drives revenue, and compares the result with the 80/20 rule. The receivables story shows how old the unpaid invoices are. The margin story compares gross margin across product lines. The giving story shows when a nonprofit receives gifts across the calendar year. The rentals story checks whether a video rental business is busier on some weekdays than others.
Copy the SQL and run it in the chart lab, where you can change the query, switch the chart type and download the picture or the data.
Margin and cumulative share are ratios. The chart shows them as percentages, and the query returns them as fractions, such as 0.42 for 42%.
No. The sample databases are synthetic, built to look like real businesses (a wholesaler, a CPA firm, a nonprofit and a rental store). The patterns are useful for learning, but the numbers are not the results of any actual company.
A chart only shows what the query returns. If a month has no rows in the sample, it does not appear. The receivables buckets are measured against today's date, so the balance in each bucket changes as time passes.
More tools: all tools · function reference · guides