SQLab
LearnPracticeProblemsArenaLeaderboard
© 2026 SQLab · Tashkent
SQLab

Learn SQL right in the browser — nothing to install.

Platform

  • Learn
  • Practice
  • Problems
  • Arena
  • Leaderboard

Who it is for

  • Students
  • Teachers
  • Universities
© 2026 SQLab. All rights reserved.Made in Uzbekistan, for students.
LearnPracticeProblemsArenaLeaderboard
Arena

Online store

Customers, products, orders and reviews. Every online store runs on a database like this one.

6 tables · 2,375 rows

Choose a level

Easy10 questions · 100 XP

One table: selecting, sorting, conditions

0/10
Start
Medium10 questions · 200 XP

Grouping, counting, joining two tables

0/10
Start
Hard10 questions · 400 XP

Subqueries, several JOINs, window functions

0/10
Start

Tables and relations

The lines show foreign keys: which table points to which.

categories8 rows

Product categories

  • idint
  • namevarchar(40)
products63 rows

Products

  • idint
  • namevarchar(60)
  • category_idint
  • brandvarchar(30)
  • pricedecimal(12,2)
  • stockint
  • is_activebool
  • added_atdate

category_id → categories.id

reviews330 rows

Reviews

  • idint
  • product_idint
  • customer_idint
  • ratingint
  • commentvarchar(200) ?
  • created_atdate

product_id → products.idcustomer_id → customers.id

customers160 rows

Customers

  • idint
  • first_namevarchar(40)
  • last_namevarchar(40)
  • cityvarchar(30)
  • phonevarchar(16)
  • emailvarchar(80) ?
  • registered_atdate
orders640 rows

Orders

  • idint
  • customer_idint
  • statusvarchar(12)
  • ordered_atdatetime
  • cityvarchar(30)
  • payment_methodvarchar(10)
  • delivered_atdatetime ?

customer_id → customers.id

order_items1,174 rows

Order lines

  • idint
  • order_idint
  • product_idint
  • quantityint
  • unit_pricedecimal(12,2)

order_id → orders.idproduct_id → products.id

LearnPracticeProblemsArenaLeaderboard

SQLab

Easy10 questions · 100 XP

One table: selecting, sorting, conditions

0/10
Start
Medium10 questions · 200 XP

Grouping, counting, joining two tables

0/10
Start
Hard10 questions · 400 XP

Subqueries, several JOINs, window functions

0/10
Start