Loading…
Loading…
The Practice Hub syncs orders to PostgreSQL:
1CREATE TABLE orders (id TEXT PRIMARY KEY, customer_id TEXT, total NUMERIC, status TEXT);
2CREATE TABLE order_lines (order_id TEXT, product_sku TEXT, quantity INT);After a checkout API test, you need to prove the database matches the API response.
Your task: write the SQL that validates (1) the order exists, (2) line items match the cart, and (3) total equals the sum of line prices minus discount. What would you do if the API says paid but SQL shows no row?
Write your own answer first — the defect report, the case table, the locator, whatever the question asks for. An interviewer grades your reasoning, not your recall.
Practice this live with an AI interviewer
Starts a QA mock interview pre-filled with this problem — you can edit the brief before starting.