Validate an inner join result
Medium70 pts~25 min
- INNER JOIN
- Row-count reconciliation
Practice app · Acme Commerce DB
A real SQL database (SQLite engine) seeded with an e-commerce and HR dataset, with schema browser and query runner.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Check that joining order_items to products neither drops nor duplicates lines, and that every line price matches the catalogue.
Your task
- 1INNER JOIN order_items to products on product_id.
- 2Return three numbers: total order_items rows, joined rows, and lines where unit_price <> products.price.
- 3Expect item_rows = joined_rows and 0 price mismatches.
Acceptance criteria
- The last result set is (150, 150, 0)
- The query uses a JOIN
Constraints
- Only the last result set of your script is compared, so finish with the verification query.
SQL (SQLite engine) · Database Testing · Joins, views & aggregation