lab playground

SQL Playground: Query a Real Dataset in Your Browser

Difficulty: Beginner
Duration: Up to 2 hours
Students: 5
Free playExplore without specific objectives or guided instruction.
Real-world experiencePractice in a live, pre-configured sandbox environment.

Description

SQL is the language you use to ask a database questions, and it is the single most portable skill in data analysis. Every reporting tool, every data warehouse, and every analytics platform either speaks SQL or hides SQL underneath. Once you can write a SELECT statement, you can get an answer out of almost any system you are handed.

This playground allows you to write real SQL against a real dataset with a reset button that puts everything back if you break it.

The dataset belongs to Daily Grind, a coffee chain with eight stores across the UK. Six tables cover stores, staff, products, customers, orders, and the individual items on each order. These are the same shapes you meet in real analytical work: a transaction table, some reference tables, and foreign keys tying them together.

Start by looking around the data, then build up from a single SELECT to filtering, sorting, counting, grouping, and joining two tables together. This playground provides questions requiring you to apply each of these skills as you progress.

Learning objectives

Upon completion of this beginner-level lab, you will be able to:

  • Read a database schema and identify which table holds the data you need
  • Retrieve and filter rows using SELECT, WHERE, ORDER BY, and LIMIT
  • Summarize data using COUNT, SUM, AVG, and ROUND
  • Group rows into categories with GROUP BY and filter groups with HAVING
  • Combine two tables with a JOIN using a foreign key
  • Interpret a SQL error message and correct the query that caused it

Intended audience

  • Data Analysts
  • Data Engineers
  • Business Analysts
  • Anyone starting out with SQL

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • Working with data in a spreadsheet
  • The idea of a table with rows and columns

No prior SQL experience is needed. Nothing is installed on your computer, and no database credentials are required.

Hands-on Lab UUID

Lab steps

0 of 2 steps completed.Use arrow keys to navigate between steps. Press Enter to go to a step if available.
  1. How the Playground Works
  2. Answer Questions with SQL