SQL practice exercises
One skill at a time on generated tables. When you are ready, take the full SQL test.
SELECT and WHERE
SQL warm-up: SELECT / WHERE on the orders table.
| Aid | Bname | Cregion | Dcity | |
|---|---|---|---|---|
| 2 | 1 | Fatima Reyes | East | Mesa |
| 3 | 2 | Aisha Nakamura | West | Omaha |
| 4 | 3 | Ruth Price | South | Tulsa |
| 5 | 4 | Elena Okafor | East | Boise |
| 6 | 5 | Hannah Bennett | South | Fresno |
| 7 | 6 | Irene Novak | West | Mesa |
| 8 | 7 | Elena Lindqvist | North | Reno |
| 9 | 8 | Hector Shah | East | Tulsa |
| 10 | 9 | Victor Murphy | West | Boise |
| 11 | 10 | Emily Patel | East | Boise |
| 12 | 11 | Ethan Okafor | East | Boise |
| 13 | 12 | Priya Grant | West | Tulsa |
| 14 | 13 | Jamal Rossi | West | Omaha |
| Aid | Bsku | Cname | Dprice | |
|---|---|---|---|---|
| 2 | 1 | P-150 | Filing cabinet | 214.00 |
| 3 | 2 | P-130 | Monitor 24in | 189.00 |
| 4 | 3 | P-100 | Copy paper (case) | 42.50 |
| 5 | 4 | P-170 | Headset | 49.50 |
| 6 | 5 | P-110 | Toner cartridge | 89.99 |
| 7 | 6 | P-160 | Whiteboard | 64.75 |
| Aid | Bname | Cdepartment | Dhire_date | |
|---|---|---|---|---|
| 2 | 1 | Rosa Castillo | Customer Service | 2020-08-04 |
| 3 | 2 | Aisha Reyes | Operations | 2021-02-06 |
| 4 | 3 | Fatima Murphy | Marketing | 2020-09-15 |
| 5 | 4 | Ana Rivera | HR | 2019-11-04 |
| 6 | 5 | Grace Reyes | Finance | 2019-01-19 |
| 7 | 6 | Jamal Novak | Sales | 2025-11-21 |
| 8 | 7 | Samuel Hughes | IT | 2019-08-28 |
| Aid | Bcustomer_id | Cproduct_id | Demployee_id | Eorder_date | Fqty | Gamount | |
|---|---|---|---|---|---|---|---|
| 2 | 1001 | 5 | 1 | 1 | 2026-06-25 | 8 | 1712.00 |
| 3 | 1002 | 3 | 5 | 7 | 2026-08-02 | 4 | 359.96 |
| 4 | 1003 | 3 | 3 | 6 | 2026-05-13 | 5 | 212.50 |
| 5 | 1004 | 9 | 2 | 6 | 2026-02-13 | 3 | 567.00 |
| 6 | 1005 | 8 | 5 | 3 | 2026-08-01 | 1 | 89.99 |
| 7 | 1006 | 5 | 3 | 1 | 2026-03-21 | 1 | 42.50 |
| 8 | 1007 | 2 | 1 | 3 | 2026-03-28 | 7 | 1498.00 |
| 9 | 1008 | 13 | 2 | 3 | 2026-05-16 | 5 | 945.00 |
| 10 | 1009 | 8 | 3 | 3 | 2026-01-07 | 4 | 170.00 |
| 11 | 1010 | 13 | 6 | 2 | 2026-01-25 | 8 | 518.00 |
| 12 | 1011 | 3 | 3 | 2 | 2026-04-20 | 7 | 297.50 |
| 13 | 1012 | 3 | 3 | 7 | 2026-01-23 | 2 | 85.00 |
| 14 | 1013 | 10 | 6 | 7 | 2026-08-09 | 6 | 388.50 |
| 15 | 1014 | 9 | 3 | 1 | 2026-05-18 | 3 | 127.50 |
| 16 | 1015 | 2 | 3 | 1 | 2026-08-05 | 6 | 255.00 |
| 17 | 1016 | 7 | 6 | 7 | 2026-08-07 | 7 | 453.25 |
| 18 | 1017 | 7 | 1 | 2 | 2026-03-12 | 5 | 1070.00 |
| 19 | 1018 | 13 | 6 | 5 | 2026-05-16 | 6 | 388.50 |
| 20 | 1019 | 5 | 2 | 2 | 2026-10-01 | 1 | 189.00 |
| 21 | 1020 | 11 | 3 | 1 | 2026-08-02 | 1 | 42.50 |
| 22 | 1021 | 9 | 2 | 2 | 2026-07-28 | 3 | 567.00 |
| 23 | 1022 | 1 | 3 | 2 | 2026-07-25 | 7 | 297.50 |
| 24 | 1023 | 2 | 5 | 6 | 2026-08-13 | 5 | 449.95 |
| 25 | 1024 | 7 | 2 | 5 | 2026-10-24 | 8 | 1512.00 |
| 26 | 1025 | 8 | 4 | 2 | 2026-02-02 | 4 | 198.00 |
| 27 | 1026 | 7 | 2 | 7 | 2026-05-21 | 8 | 1512.00 |
| 28 | 1027 | 7 | 4 | 5 | 2026-07-12 | 4 | 198.00 |
| 29 | 1028 | 4 | 1 | 6 | 2026-07-05 | 2 | 428.00 |
| 30 | 1029 | 4 | 6 | 5 | 2026-08-11 | 7 | 453.25 |
| 31 | 1030 | 12 | 4 | 1 | 2026-02-04 | 8 | 396.00 |
| 32 | 1031 | 1 | 2 | 2 | 2026-06-13 | 6 | 1134.00 |
| 33 | 1032 | 2 | 2 | 7 | 2026-05-05 | 1 | 189.00 |
| 34 | 1033 | 2 | 5 | 5 | 2026-03-10 | 5 | 449.95 |
| 35 | 1034 | 3 | 5 | 3 | 2026-01-18 | 3 | 269.97 |
| 36 | 1035 | 6 | 1 | 2 | 2026-03-15 | 7 | 1498.00 |
| 37 | 1036 | 2 | 2 | 7 | 2026-06-21 | 1 | 189.00 |
| 38 | 1037 | 13 | 3 | 2 | 2026-01-27 | 2 | 85.00 |
| 39 | 1038 | 2 | 5 | 5 | 2026-03-16 | 8 | 719.92 |
| 40 | 1039 | 6 | 4 | 3 | 2026-06-04 | 6 | 297.00 |
| 41 | 1040 | 10 | 2 | 1 | 2026-08-21 | 2 | 378.00 |
| 42 | 1041 | 12 | 1 | 7 | 2026-03-09 | 2 | 428.00 |
| 43 | 1042 | 11 | 2 | 1 | 2026-10-27 | 8 | 1512.00 |
| 44 | 1043 | 7 | 5 | 2 | 2026-09-14 | 2 | 179.98 |
| 45 | 1044 | 4 | 1 | 7 | 2026-05-02 | 7 | 1498.00 |
| 46 | 1045 | 11 | 1 | 4 | 2026-08-20 | 4 | 856.00 |
| 47 | 1046 | 6 | 3 | 4 | 2026-02-01 | 4 | 170.00 |
| 48 | 1047 | 7 | 4 | 4 | 2026-10-08 | 3 | 148.50 |
| 49 | 1048 | 12 | 6 | 1 | 2026-09-27 | 6 | 388.50 |
| 50 | 1049 | 9 | 1 | 3 | 2026-09-28 | 1 | 214.00 |
Tables are loaded into an in-browser SQLite database (sql.js). Write a query per question, press Run (or Check all). Only the result set is graded — aliases and extra whitespace are fine.
JOINs
SQL warm-up: JOIN customers and products to an order.
| Aid | Bname | Cregion | Dcity | |
|---|---|---|---|---|
| 2 | 1 | Fatima Dubois | South | Boise |
| 3 | 2 | Hector Price | North | Dayton |
| 4 | 3 | Elena Lopez | South | Omaha |
| 5 | 4 | Marcus Lindqvist | North | Boise |
| 6 | 5 | Omar Mendoza | East | Reno |
| 7 | 6 | Ruth Ibrahim | South | Reno |
| 8 | 7 | Emily Walsh | South | Omaha |
| 9 | 8 | Liam Rivera | West | Boise |
| 10 | 9 | Priya Murphy | East | Mesa |
| 11 | 10 | Olivia Price | South | Tulsa |
| 12 | 11 | Maria Chen | South | Mesa |
| Aid | Bsku | Cname | Dprice | |
|---|---|---|---|---|
| 2 | 1 | P-120 | Desk chair | 159.00 |
| 3 | 2 | P-210 | Desk lamp | 27.60 |
| 4 | 3 | P-170 | Headset | 49.50 |
| 5 | 4 | P-130 | Monitor 24in | 189.00 |
| 6 | 5 | P-110 | Toner cartridge | 89.99 |
| 7 | 6 | P-190 | Webcam | 72.25 |
| Aid | Bname | Cdepartment | Dhire_date | |
|---|---|---|---|---|
| 2 | 1 | Leila Brooks | Operations | 2022-12-25 |
| 3 | 2 | Rosa Rossi | Operations | 2019-06-15 |
| 4 | 3 | Hannah Garcia | HR | 2022-05-26 |
| 5 | 4 | Victor Brooks | Operations | 2019-08-14 |
| 6 | 5 | Fatima Garcia | Customer Service | 2019-06-11 |
| 7 | 6 | Irene Price | Customer Service | 2021-09-20 |
| 8 | 7 | Carlos Fischer | HR | 2025-06-06 |
| 9 | 8 | Ruth Silva | IT | 2020-12-04 |
| Aid | Bcustomer_id | Cproduct_id | Demployee_id | Eorder_date | Fqty | Gamount | |
|---|---|---|---|---|---|---|---|
| 2 | 1001 | 10 | 2 | 5 | 2026-05-23 | 5 | 138.00 |
| 3 | 1002 | 7 | 2 | 8 | 2026-06-26 | 3 | 82.80 |
| 4 | 1003 | 7 | 4 | 2 | 2026-10-06 | 4 | 756.00 |
| 5 | 1004 | 8 | 4 | 7 | 2026-03-25 | 1 | 189.00 |
| 6 | 1005 | 3 | 6 | 8 | 2026-01-10 | 1 | 72.25 |
| 7 | 1006 | 3 | 6 | 6 | 2026-07-10 | 7 | 505.75 |
| 8 | 1007 | 11 | 1 | 4 | 2026-05-10 | 8 | 1272.00 |
| 9 | 1008 | 6 | 3 | 2 | 2026-04-20 | 2 | 99.00 |
| 10 | 1009 | 3 | 2 | 3 | 2026-10-10 | 7 | 193.20 |
| 11 | 1010 | 7 | 3 | 3 | 2026-07-13 | 5 | 247.50 |
| 12 | 1011 | 8 | 1 | 6 | 2026-03-24 | 2 | 318.00 |
| 13 | 1012 | 2 | 3 | 3 | 2026-01-18 | 4 | 198.00 |
| 14 | 1013 | 3 | 5 | 6 | 2026-03-07 | 6 | 539.94 |
| 15 | 1014 | 8 | 3 | 7 | 2026-02-22 | 4 | 198.00 |
| 16 | 1015 | 2 | 1 | 7 | 2026-07-23 | 8 | 1272.00 |
| 17 | 1016 | 8 | 5 | 7 | 2026-09-19 | 8 | 719.92 |
| 18 | 1017 | 5 | 4 | 7 | 2026-02-19 | 2 | 378.00 |
| 19 | 1018 | 5 | 5 | 2 | 2026-10-16 | 7 | 629.93 |
| 20 | 1019 | 5 | 2 | 3 | 2026-06-20 | 6 | 165.60 |
| 21 | 1020 | 7 | 5 | 4 | 2026-04-24 | 1 | 89.99 |
| 22 | 1021 | 10 | 5 | 6 | 2026-05-19 | 4 | 359.96 |
| 23 | 1022 | 5 | 5 | 7 | 2026-08-27 | 8 | 719.92 |
| 24 | 1023 | 10 | 4 | 3 | 2026-09-03 | 8 | 1512.00 |
| 25 | 1024 | 7 | 3 | 6 | 2026-08-23 | 8 | 396.00 |
| 26 | 1025 | 10 | 6 | 6 | 2026-01-23 | 6 | 433.50 |
| 27 | 1026 | 6 | 5 | 7 | 2026-02-02 | 2 | 179.98 |
| 28 | 1027 | 10 | 3 | 7 | 2026-02-16 | 8 | 396.00 |
| 29 | 1028 | 8 | 2 | 2 | 2026-10-05 | 6 | 165.60 |
| 30 | 1029 | 8 | 4 | 1 | 2026-01-25 | 4 | 756.00 |
| 31 | 1030 | 10 | 1 | 8 | 2026-02-09 | 6 | 954.00 |
| 32 | 1031 | 6 | 1 | 1 | 2026-02-20 | 7 | 1113.00 |
| 33 | 1032 | 8 | 4 | 2 | 2026-04-02 | 2 | 378.00 |
| 34 | 1033 | 3 | 4 | 4 | 2026-06-15 | 8 | 1512.00 |
| 35 | 1034 | 4 | 5 | 8 | 2026-04-02 | 1 | 89.99 |
| 36 | 1035 | 6 | 6 | 4 | 2026-05-09 | 1 | 72.25 |
| 37 | 1036 | 8 | 5 | 1 | 2026-06-07 | 8 | 719.92 |
| 38 | 1037 | 11 | 5 | 7 | 2026-02-28 | 8 | 719.92 |
| 39 | 1038 | 2 | 3 | 7 | 2026-05-23 | 1 | 49.50 |
| 40 | 1039 | 7 | 5 | 7 | 2026-03-04 | 8 | 719.92 |
| 41 | 1040 | 7 | 4 | 6 | 2026-09-13 | 8 | 1512.00 |
| 42 | 1041 | 4 | 6 | 7 | 2026-02-08 | 5 | 361.25 |
| 43 | 1042 | 11 | 2 | 4 | 2026-03-27 | 6 | 165.60 |
| 44 | 1043 | 7 | 4 | 2 | 2026-09-08 | 3 | 567.00 |
| 45 | 1044 | 10 | 3 | 4 | 2026-07-26 | 8 | 396.00 |
| 46 | 1045 | 7 | 5 | 8 | 2026-07-26 | 6 | 539.94 |
| 47 | 1046 | 2 | 3 | 8 | 2026-01-06 | 7 | 346.50 |
| 48 | 1047 | 2 | 4 | 1 | 2026-09-01 | 1 | 189.00 |
| 49 | 1048 | 11 | 1 | 3 | 2026-06-15 | 6 | 954.00 |
| 50 | 1049 | 3 | 1 | 1 | 2026-10-23 | 8 | 1272.00 |
| 51 | 1050 | 8 | 3 | 5 | 2026-09-21 | 3 | 148.50 |
| 52 | 1051 | 9 | 6 | 7 | 2026-10-04 | 7 | 505.75 |
Tables are loaded into an in-browser SQLite database (sql.js). Write a query per question, press Run (or Check all). Only the result set is graded — aliases and extra whitespace are fine.
GROUP BY and HAVING
SQL warm-up: GROUP BY / HAVING on revenue by region.
| Aid | Bname | Cregion | Dcity | |
|---|---|---|---|---|
| 2 | 1 | Olivia Morgan | West | Provo |
| 3 | 2 | Chloe Price | East | Reno |
| 4 | 3 | Nguyen Hughes | West | Tulsa |
| 5 | 4 | Mei Hughes | South | Boise |
| 6 | 5 | Kwame Brooks | South | Tulsa |
| 7 | 6 | Emily Chen | South | Dayton |
| 8 | 7 | Aisha Mendoza | South | Omaha |
| 9 | 8 | Rosa Johnson | East | Tulsa |
| 10 | 9 | Nguyen Dubois | South | Fresno |
| 11 | 10 | Priya Tran | South | Boise |
| Aid | Bsku | Cname | Dprice | |
|---|---|---|---|---|
| 2 | 1 | P-110 | Toner cartridge | 89.99 |
| 3 | 2 | P-200 | Keyboard and mouse | 38.00 |
| 4 | 3 | P-130 | Monitor 24in | 189.00 |
| 5 | 4 | P-210 | Desk lamp | 27.60 |
| 6 | 5 | P-140 | Label printer | 129.95 |
| 7 | 6 | P-190 | Webcam | 72.25 |
| 8 | 7 | P-100 | Copy paper (case) | 42.50 |
| Aid | Bname | Cdepartment | Dhire_date | |
|---|---|---|---|---|
| 2 | 1 | Ethan Nakamura | Marketing | 2021-08-02 |
| 3 | 2 | Peter Adeyemi | Operations | 2020-09-03 |
| 4 | 3 | Rosa Garcia | Customer Service | 2023-10-14 |
| 5 | 4 | Diego Mendoza | Operations | 2023-06-03 |
| 6 | 5 | Liam Reyes | Finance | 2022-04-04 |
| 7 | 6 | Isaac Bennett | Sales | 2025-03-27 |
| 8 | 7 | Carlos Delgado | Operations | 2021-04-11 |
| 9 | 8 | Leila Novak | Operations | 2024-01-22 |
| Aid | Bcustomer_id | Cproduct_id | Demployee_id | Eorder_date | Fqty | Gamount | |
|---|---|---|---|---|---|---|---|
| 2 | 1001 | 6 | 1 | 8 | 2026-09-28 | 5 | 449.95 |
| 3 | 1002 | 9 | 4 | 8 | 2026-06-09 | 4 | 110.40 |
| 4 | 1003 | 1 | 7 | 1 | 2026-03-25 | 1 | 42.50 |
| 5 | 1004 | 4 | 1 | 4 | 2026-03-05 | 2 | 179.98 |
| 6 | 1005 | 8 | 7 | 8 | 2026-04-10 | 2 | 85.00 |
| 7 | 1006 | 7 | 7 | 6 | 2026-10-21 | 5 | 212.50 |
| 8 | 1007 | 3 | 1 | 5 | 2026-02-05 | 6 | 539.94 |
| 9 | 1008 | 9 | 4 | 4 | 2026-06-12 | 1 | 27.60 |
| 10 | 1009 | 4 | 3 | 3 | 2026-03-26 | 2 | 378.00 |
| 11 | 1010 | 10 | 2 | 2 | 2026-08-10 | 8 | 304.00 |
| 12 | 1011 | 9 | 6 | 2 | 2026-05-26 | 1 | 72.25 |
| 13 | 1012 | 8 | 7 | 1 | 2026-06-16 | 5 | 212.50 |
| 14 | 1013 | 2 | 5 | 7 | 2026-10-03 | 2 | 259.90 |
| 15 | 1014 | 8 | 7 | 4 | 2026-07-12 | 6 | 255.00 |
| 16 | 1015 | 2 | 7 | 1 | 2026-07-03 | 6 | 255.00 |
| 17 | 1016 | 2 | 5 | 4 | 2026-01-08 | 2 | 259.90 |
| 18 | 1017 | 2 | 4 | 2 | 2026-08-11 | 6 | 165.60 |
| 19 | 1018 | 2 | 4 | 2 | 2026-05-25 | 1 | 27.60 |
| 20 | 1019 | 6 | 5 | 4 | 2026-04-09 | 7 | 909.65 |
| 21 | 1020 | 9 | 1 | 5 | 2026-03-06 | 4 | 359.96 |
| 22 | 1021 | 5 | 5 | 5 | 2026-05-18 | 3 | 389.85 |
| 23 | 1022 | 2 | 1 | 6 | 2026-05-17 | 2 | 179.98 |
| 24 | 1023 | 1 | 1 | 2 | 2026-10-19 | 5 | 449.95 |
| 25 | 1024 | 3 | 5 | 5 | 2026-03-14 | 8 | 1039.60 |
| 26 | 1025 | 5 | 1 | 8 | 2026-05-13 | 1 | 89.99 |
| 27 | 1026 | 3 | 5 | 7 | 2026-08-13 | 7 | 909.65 |
| 28 | 1027 | 4 | 7 | 3 | 2026-09-18 | 1 | 42.50 |
| 29 | 1028 | 6 | 2 | 3 | 2026-09-24 | 6 | 228.00 |
| 30 | 1029 | 7 | 5 | 5 | 2026-09-16 | 2 | 259.90 |
| 31 | 1030 | 7 | 2 | 1 | 2026-08-22 | 2 | 76.00 |
| 32 | 1031 | 8 | 5 | 2 | 2026-04-27 | 8 | 1039.60 |
| 33 | 1032 | 4 | 4 | 3 | 2026-08-18 | 2 | 55.20 |
| 34 | 1033 | 5 | 6 | 2 | 2026-06-17 | 7 | 505.75 |
| 35 | 1034 | 5 | 5 | 8 | 2026-03-21 | 2 | 259.90 |
| 36 | 1035 | 1 | 6 | 1 | 2026-05-24 | 5 | 361.25 |
| 37 | 1036 | 5 | 6 | 6 | 2026-08-01 | 5 | 361.25 |
| 38 | 1037 | 1 | 6 | 4 | 2026-04-08 | 2 | 144.50 |
| 39 | 1038 | 10 | 6 | 5 | 2026-09-01 | 5 | 361.25 |
| 40 | 1039 | 3 | 2 | 5 | 2026-08-04 | 3 | 114.00 |
| 41 | 1040 | 8 | 6 | 1 | 2026-02-03 | 4 | 289.00 |
| 42 | 1041 | 5 | 1 | 7 | 2026-02-05 | 6 | 539.94 |
| 43 | 1042 | 9 | 6 | 1 | 2026-04-19 | 3 | 216.75 |
| 44 | 1043 | 10 | 5 | 2 | 2026-08-23 | 8 | 1039.60 |
| 45 | 1044 | 2 | 7 | 1 | 2026-10-08 | 6 | 255.00 |
| 46 | 1045 | 8 | 7 | 4 | 2026-07-14 | 3 | 127.50 |
| 47 | 1046 | 10 | 7 | 5 | 2026-02-25 | 1 | 42.50 |
| 48 | 1047 | 7 | 1 | 7 | 2026-04-13 | 6 | 539.94 |
| 49 | 1048 | 7 | 4 | 8 | 2026-01-14 | 5 | 138.00 |
| 50 | 1049 | 4 | 6 | 1 | 2026-10-13 | 3 | 216.75 |
| 51 | 1050 | 7 | 5 | 7 | 2026-02-06 | 3 | 389.85 |
| 52 | 1051 | 2 | 6 | 6 | 2026-07-12 | 2 | 144.50 |
| 53 | 1052 | 6 | 4 | 8 | 2026-07-09 | 6 | 165.60 |
| 54 | 1053 | 4 | 4 | 5 | 2026-02-09 | 3 | 82.80 |
Tables are loaded into an in-browser SQLite database (sql.js). Write a query per question, press Run (or Check all). Only the result set is graded — aliases and extra whitespace are fine.
Window RANK
SQL warm-up: RANK window over product revenue.
| Aid | Bname | Cregion | Dcity | |
|---|---|---|---|---|
| 2 | 1 | Emily Garcia | South | Tulsa |
| 3 | 2 | Rosa Rivera | East | Omaha |
| 4 | 3 | Aisha Murphy | West | Boise |
| 5 | 4 | Liam Johnson | West | Dayton |
| 6 | 5 | Priya Okafor | South | Fresno |
| 7 | 6 | Marcus Patel | South | Reno |
| 8 | 7 | Emily Ortiz | West | Fresno |
| 9 | 8 | Andre Hughes | West | Boise |
| 10 | 9 | Ruth Delgado | West | Fresno |
| 11 | 10 | Omar Reyes | South | Omaha |
| 12 | 11 | Elena Tran | South | Dayton |
| Aid | Bsku | Cname | Dprice | |
|---|---|---|---|---|
| 2 | 1 | P-210 | Desk lamp | 27.60 |
| 3 | 2 | P-120 | Desk chair | 159.00 |
| 4 | 3 | P-150 | Filing cabinet | 214.00 |
| 5 | 4 | P-140 | Label printer | 129.95 |
| 6 | 5 | P-110 | Toner cartridge | 89.99 |
| 7 | 6 | P-200 | Keyboard and mouse | 38.00 |
| 8 | 7 | P-160 | Whiteboard | 64.75 |
| Aid | Bname | Cdepartment | Dhire_date | |
|---|---|---|---|---|
| 2 | 1 | Ethan Foster | Finance | 2022-05-16 |
| 3 | 2 | Andre Kim | HR | 2022-12-27 |
| 4 | 3 | Rosa Delgado | Finance | 2021-05-23 |
| 5 | 4 | Ruth Ibrahim | Customer Service | 2024-07-10 |
| 6 | 5 | Leila Ortiz | Customer Service | 2021-06-23 |
| 7 | 6 | Nguyen Castillo | Sales | 2025-03-04 |
| 8 | 7 | Liam Mensah | Sales | 2022-09-28 |
| 9 | 8 | Hannah Chen | IT | 2020-12-10 |
| Aid | Bcustomer_id | Cproduct_id | Demployee_id | Eorder_date | Fqty | Gamount | |
|---|---|---|---|---|---|---|---|
| 2 | 1001 | 5 | 1 | 4 | 2026-09-22 | 6 | 165.60 |
| 3 | 1002 | 9 | 3 | 7 | 2026-03-08 | 5 | 1070.00 |
| 4 | 1003 | 3 | 4 | 6 | 2026-07-02 | 1 | 129.95 |
| 5 | 1004 | 9 | 4 | 2 | 2026-07-20 | 1 | 129.95 |
| 6 | 1005 | 8 | 4 | 2 | 2026-01-22 | 5 | 649.75 |
| 7 | 1006 | 1 | 2 | 1 | 2026-07-01 | 2 | 318.00 |
| 8 | 1007 | 6 | 4 | 5 | 2026-03-25 | 2 | 259.90 |
| 9 | 1008 | 2 | 5 | 1 | 2026-05-18 | 6 | 539.94 |
| 10 | 1009 | 5 | 7 | 4 | 2026-07-28 | 1 | 64.75 |
| 11 | 1010 | 4 | 4 | 4 | 2026-05-11 | 6 | 779.70 |
| 12 | 1011 | 11 | 2 | 6 | 2026-06-21 | 6 | 954.00 |
| 13 | 1012 | 3 | 5 | 7 | 2026-03-24 | 8 | 719.92 |
| 14 | 1013 | 5 | 2 | 1 | 2026-02-18 | 7 | 1113.00 |
| 15 | 1014 | 1 | 6 | 1 | 2026-09-02 | 7 | 266.00 |
| 16 | 1015 | 8 | 5 | 8 | 2026-09-23 | 5 | 449.95 |
| 17 | 1016 | 4 | 3 | 8 | 2026-06-13 | 7 | 1498.00 |
| 18 | 1017 | 8 | 4 | 6 | 2026-09-08 | 8 | 1039.60 |
| 19 | 1018 | 9 | 5 | 3 | 2026-02-14 | 4 | 359.96 |
| 20 | 1019 | 8 | 5 | 4 | 2026-06-10 | 2 | 179.98 |
| 21 | 1020 | 2 | 2 | 5 | 2026-05-28 | 6 | 954.00 |
| 22 | 1021 | 5 | 1 | 3 | 2026-01-11 | 1 | 27.60 |
| 23 | 1022 | 10 | 1 | 7 | 2026-09-08 | 2 | 55.20 |
| 24 | 1023 | 9 | 6 | 8 | 2026-01-16 | 6 | 228.00 |
| 25 | 1024 | 1 | 3 | 2 | 2026-06-28 | 7 | 1498.00 |
| 26 | 1025 | 9 | 4 | 7 | 2026-05-01 | 1 | 129.95 |
| 27 | 1026 | 6 | 7 | 8 | 2026-04-20 | 5 | 323.75 |
| 28 | 1027 | 10 | 4 | 4 | 2026-07-15 | 1 | 129.95 |
| 29 | 1028 | 5 | 4 | 6 | 2026-07-26 | 7 | 909.65 |
| 30 | 1029 | 1 | 4 | 6 | 2026-03-14 | 2 | 259.90 |
| 31 | 1030 | 1 | 4 | 4 | 2026-01-19 | 5 | 649.75 |
| 32 | 1031 | 10 | 7 | 2 | 2026-09-04 | 6 | 388.50 |
| 33 | 1032 | 8 | 2 | 8 | 2026-03-24 | 6 | 954.00 |
| 34 | 1033 | 1 | 6 | 6 | 2026-02-02 | 3 | 114.00 |
| 35 | 1034 | 10 | 6 | 8 | 2026-02-12 | 5 | 190.00 |
| 36 | 1035 | 2 | 7 | 7 | 2026-10-14 | 7 | 453.25 |
| 37 | 1036 | 6 | 1 | 4 | 2026-03-26 | 3 | 82.80 |
| 38 | 1037 | 4 | 4 | 3 | 2026-01-01 | 4 | 519.80 |
| 39 | 1038 | 9 | 5 | 3 | 2026-07-16 | 1 | 89.99 |
| 40 | 1039 | 11 | 7 | 3 | 2026-04-08 | 5 | 323.75 |
| 41 | 1040 | 7 | 3 | 8 | 2026-01-13 | 2 | 428.00 |
| 42 | 1041 | 10 | 6 | 2 | 2026-05-09 | 1 | 38.00 |
| 43 | 1042 | 10 | 7 | 5 | 2026-02-18 | 7 | 453.25 |
| 44 | 1043 | 6 | 4 | 4 | 2026-06-16 | 5 | 649.75 |
| 45 | 1044 | 11 | 7 | 5 | 2026-01-22 | 6 | 388.50 |
| 46 | 1045 | 1 | 4 | 3 | 2026-04-16 | 7 | 909.65 |
| 47 | 1046 | 7 | 5 | 5 | 2026-10-21 | 7 | 629.93 |
| 48 | 1047 | 8 | 5 | 7 | 2026-01-03 | 6 | 539.94 |
Tables are loaded into an in-browser SQLite database (sql.js). Write a query per question, press Run (or Check all). Only the result set is graded — aliases and extra whitespace are fine.
Questions people ask
How do these differ from the full SQL test?
Each set below drills one skill with a single question on a fresh generated database. Use them to warm up, then take the full seven-question SQL test.
Is this Power BI or a vendor SQL exam?
No. Plain SQLite practice we generate and grade ourselves. No vendor branding.
Keep practicing
SQL test
In-browser SQLite: SELECT, JOINs, GROUP BY, dates, CTEs, windows.
ExcelExcel assessment test
8 questions, about 25 minutes. Lookups, conditional sums, dates.
ExcelExcel interview test
6 interview-style questions on a shipments sheet.
ExcelAdministrative assistant Excel test
Dedupe clients, chase overdue invoices, total orders.
ExcelAccounts payable Excel test
Duplicate bills, PO mismatches, aging buckets.
ExcelExcel charts test
Column, line and pie: peak month, slice share, chart-type choices.
ExcelExcel regression test
SLOPE, INTERCEPT, RSQ, CORREL, FORECAST on noisy data.
ExcelBookkeeper Excel test
Bank reconciliation: uncleared items and amount mismatches.