Sanity Checks
Compare counts before and after joins to catch duplicated rows.
Example
SELECT (SELECT COUNT(*) FROM students) AS students,
(SELECT COUNT(*) FROM students s JOIN enrolments e ON e.student_id = s.id) AS after_join;Result
students | after_join 8 | 8
Exercise
Count rows.
SELECT (*) FROM t
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.