hard20 pts · first answer countssqldata-validation
Migration check returns nothing
You check that every legacy order was migrated. The query returns 0 rows, yet you know some orders are missing. The new_orders.legacy_id column contains a few NULLs. What is going on?
SELECT id FROM legacy_orders WHERE id NOT IN (SELECT legacy_id FROM new_orders);
Discussion 0
Join free to post in the discussion.
Related questions
- Verifying data with SQLQA Engineer
- Finding duplicate records with SQLQA Engineer
- Stopping SQL injectionBackend Developer
- Purpose of a database indexBackend Developer
- Rows returned by a LEFT JOINBackend Developer
- What a foreign key enforcesBackend Developer
- Atomicity in a money transferBackend Developer
- COUNT and AVG with NULLsBackend Developer