Skip to content
/ Chapter 1 · Welcome to the Shed
Lesson 1.4 · garden_shop
Lesson 1.4

Meet the SQL Workbench

The workbench is where you try SQL, read results, and fix mistakes.

Every interactive lesson has the same workbench. Here is each part and what it does:

  • The editor is where you write SQL. Press Ctrl + Enter (⌘ + Enter on a Mac) to run without reaching for the mouse.
  • Run query runs what is in the editor and shows the result or the error underneath.
  • Format tidies the layout of your query: line breaks and indentation. It never changes what the query does.
  • Reset puts the starter query back and clears the result.
  • Share copies a link that opens this lesson with your query in the editor. The query travels inside the link.
  • Hint shows one hint at a time, and Reveal solution puts a working answer in the editor.
  • Expected answer describes the columns and rows a correct query returns, so you can check your own result against it.
  • The schema panel above the workbench lists the dataset's tables and columns. Check spellings there.

Errors are part of the workflow. A useful SQL habit is to run a query, read the message, make one small fix, and run it again.

Pattern
select column_one, column_two
from table_name
limit 5
Schema · Garden Shop Table · products 9 columns · 24 rows
Table · products

One row per product, with price, cost, and inventory levels.

9 columns · 24 rows
product_id int product_name text category_id int supplier_id int price decimal cost decimal quantity_on_hand int reorder_level int discontinued bool
Your task

Run the starter query to see what happens, then fix it so it shows each product's product name, price, and quantity on hand for the first 5 rows.

·

Run your query to inspect the result.

Expected answer
  • Columns: product_name, price, quantity_on_hand.
  • Rows: 5 products.
  • The query should run without an error.