hard20 pts · first answer countssqlnull-handling
Not-equal filter loses rows
The status column has the values 'paid', 'refunded', 'paid' and NULL. How many rows does this query count?
SELECT COUNT(*) FROM orders WHERE status <> 'refunded';
The status column has the values 'paid', 'refunded', 'paid' and NULL. How many rows does this query count?
SELECT COUNT(*) FROM orders WHERE status <> 'refunded';