SQL Module

How to use the SQL editor, explore the database schema, and run queries

1

Open a SQL assignment

When you open a SQL assignment, you'll see an overview panel on the left that explains the database structure and lists the specific queries you need to write. The main area displays instructions for each query, such as finding all books or calculating revenue per author. Click "Open SQL Editor" at the bottom right to start writing your SQL code for each question.

Open a SQL assignment
2

Explore the database schema

The left sidebar displays the database structure for a bookstore, showing three main tables: authors, books, and sales. Each table lists its columns with data types (like INTEGER for numbers, TEXT for words) and shows the relationships between tables through foreign keys (indicated by the orange "FK→" labels). This schema view helps you understand how the data is organized before writing SQL queries to retrieve information from the database.

Explore the database schema
3

Write and run a query

The query editor area is empty and shows "Query executed. No results returned." because no SQL query has been written yet. You can see the database schema on the left side showing three tables (authors, books, and sales) with their column names and data types. To get started, type your SQL query in the editor area above the results section, then click the "Run" button to execute it.

Write and run a query
4

Use multiple tabs

Use multiple tabs
5

Reset the database

Reset the database
6

Submit your SQL work

Submit your SQL work