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
Pick a business question or write your own SELECT, run it on the sample databases, and see the result as a chart, a table and the SQL.
Choose a ready business question or write your own SELECT.
The query runs on the sample database you choose, on SQL Server or MariaDB.
Check the chart, the table and the SQL, then copy the SQL for your own use.
Pick one of the business questions, or write your own SELECT, and the lab runs it against a free sample database. You get the result three ways: a chart that fits the shape of the data, the table of rows, and the SQL itself. Every question is available in both SQL Server and MariaDB syntax, so you can switch engines and compare.
The chart type is chosen for you. A month or quarter column gives a line. A category with a number gives columns or bars. Two numbers give a scatter, and one number with many rows gives a histogram. Use the buttons above the chart to switch to another type that fits the same data.
Columns and bars compare categories. Lengths start at zero, so the sizes compare directly. Lines and areas show change over an ordered list, usually time. Donuts show shares of a whole for a handful of parts. Histograms show how values spread across ranges. Scatter plots place each item by two measures. Waterfalls bridge a starting total to an ending total through each step. Heatmaps colour a grid of categories against periods, darker for larger values.
Hover over a mark, or use the keyboard: Tab to the chart, then the arrow keys move from point to point and Escape clears the tip. Click a legend item to hide a series. Download SVG saves the picture, and Copy data as CSV copies the numbers behind it.
The sample dates move forward every day, so a month or a week in the sample is a different set of rows over time. The "What to notice" sentences describe the shape of each result, such as which category leads or where the peaks fall, so they stay true as the dates change. Totals that do not depend on dates, such as the all-time customer ranking, stay the same.
Yes. Choose "Write your own SELECT" and type one query. The lab accepts a single read-only SELECT (a WITH clause is fine). The server refuses writes and more than one statement. Pick the sample database the query uses, and use the schema prefix that engine expects.
The two engines hold different copies of the sample. Compare the shape of the chart across engines rather than the exact totals, unless the database is the same on both sides.
The SQL editor opens a database, not a query, so the lab cannot pass your SQL to it. Copy the SQL and paste it into the editor instead.
The chart library is public as LSCharts.render(element, spec) in charts.js. Give it a column list and rows, and it draws the chart in light and dark themes with a table for screen readers.
More tools: all tools · function reference · guides