Careeroza
Demo Database
About the Demo Database
All examples in this tutorial use a small online-store database with five tables. Every example's Run button creates the tables it needs, so you can experiment freely.
| Table | Holds |
|---|---|
Customers | companies that place orders |
Employees | staff, their department, salary and manager |
Products | items for sale with price and stock |
Orders | one row per order: who ordered, who handled it, when, and the total |
OrderDetails | the products and quantities inside each order |
Customers
| CustomerID | CustomerName | ContactName | City | Country |
|---|---|---|---|---|
| 1 | Aarav Traders | Aarav Shah | Mumbai | India |
| 2 | Blue Harbor Foods | Emma Clark | London | UK |
| 3 | Cedar & Co | Liam Brown | Toronto | Canada |
| 4 | Delta Mart | Priya Nair | Bengaluru | India |
| 5 | Evergreen Grocers | Noah Wilson | New York | USA |
| 6 | Fjord Supplies | Ingrid Olsen | Oslo | Norway |
| 7 | Golden Spoon | Mei Chen | NULL | Singapore |
| 8 | Harbor Lights | Olivia Martin | London | UK |
Note: Golden Spoon has no City (it is NULL), and Fjord Supplies and Harbor Lights have never placed an order. These rows are useful later for NULL handling and outer joins.
Employees
| EmployeeID | FirstName | LastName | Department | Salary | ManagerID | HireDate |
|---|---|---|---|---|---|---|
| 1 | Rahul | Verma | Sales | 72000 | NULL | 2019-04-01 |
| 2 | Sara | Khan | Sales | 58000 | 1 | 2021-07-15 |
| 3 | David | Lee | Sales | 61000 | 1 | 2020-11-02 |
| 4 | Ananya | Iyer | Support | 45000 | 5 | 2022-01-10 |
| 5 | James | Taylor | Support | 67000 | NULL | 2018-09-23 |
| 6 | Fatima | Ali | Finance | 80000 | NULL | 2017-03-05 |
ManagerID points to another row in the same table (Sara and David report to Rahul).
Products
| ProductID | ProductName | Category | Price | Stock |
|---|---|---|---|---|
| 1 | Basmati Rice 5kg | Grocery | 12.5 | 120 |
| 2 | Green Tea 100 bags | Beverages | 6.75 | 300 |
| 3 | Olive Oil 1L | Grocery | 9.99 | 80 |
| 4 | Dark Chocolate | Snacks | 3.49 | 0 |
| 5 | Espresso Beans 1kg | Beverages | 18 | 45 |
| 6 | Almonds 500g | Snacks | 8.25 | NULL |
Orders
| OrderID | CustomerID | EmployeeID | OrderDate | Amount |
|---|---|---|---|---|
| 101 | 1 | 2 | 2024-01-05 | 245.5 |
| 102 | 4 | 3 | 2024-01-12 | 89.9 |
| 103 | 2 | 2 | 2024-02-03 | 412 |
| 104 | 1 | 3 | 2024-02-18 | 56.25 |
| 105 | 5 | NULL | 2024-03-01 | 150 |
| 106 | 3 | 2 | 2024-03-09 | 320.75 |
| 107 | 4 | 3 | 2024-03-22 | 27 |
| 108 | 7 | 2 | 2024-04-02 | 198.4 |
Order 105 has no EmployeeID (an online order nobody handled).
OrderDetails
| OrderDetailID | OrderID | ProductID | Quantity |
|---|---|---|---|
| 1 | 101 | 1 | 10 |
| 2 | 101 | 2 | 5 |
| 3 | 102 | 4 | 12 |
| 4 | 103 | 5 | 8 |
| 5 | 103 | 3 | 20 |
| 6 | 104 | 2 | 3 |
| 7 | 105 | 1 | 6 |
| 8 | 106 | 5 | 10 |
| 9 | 106 | 6 | 4 |
| 10 | 107 | 4 | 6 |
| 11 | 108 | 3 | 9 |
| 12 | 108 | 2 | 7 |