sql_compare_counts
Compare row counts between parent and child tables joined by a foreign key to detect missing or extra records and identify data gaps.
Instructions
Compare row counts between a parent and child table (joined by FK) to detect missing or extra records. Useful for finding data gaps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| childTable | Yes | Child table (e.g. 'Orders') | |
| joinColumn | Yes | The FK column name that links them (e.g. 'CustomerId') | |
| parentTable | Yes | Parent/reference table (e.g. 'Customers') |