Grokking the Data Engineering Interview
0% completed
Writing Data Tests
SELECT order_id, buyer_id, seller_id, status FROM orders WHERE buyer_id IS NULL ORDER BY order_id;
Output:
+----------+----------+-----------+--------+ | order_id | buyer_id | seller_id | status | +----------+----------+-----------+--------+ | 1003 | NULL | S-1 | paid | +----------+----------+-----------+--------+
This query returned one row, and that row is the problem it was written to find. Order 1003 has no buyer, so no customer can be charged or sent a receipt for it. An empty result would have meant that the table passed the check.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%