For each transaction, compute expected_total as quantity * price (from products)
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
Problem
For each transaction, compute expected_total as quantity * price (from products). Return transaction_id, quantity, total_amount, expected_total where total_amount <> expected_total. Order by transaction_id.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.