easy5 pts · first answer countssqljoins
Row count of a LEFT JOIN
customers has 3 rows (ids 1, 2, 3). orders has 3 rows: two for customer 1 and one for customer 2. How many rows does this query return?
SELECT COUNT(*) FROM customers c LEFT JOIN orders o ON o.customer_id = c.id;
Discussion 0
Join free to post in the discussion.
Related questions
- Purpose of a primary keyData Engineer
- Filtering with = NULLData Engineer
- COUNT(*) vs COUNT(column)Data Engineer
- Filtering groups with HAVINGData Engineer
- Adding a number to NULLData Engineer
- Orders pointing to missing customersData Engineer
- Joining with a small lookup tableData Engineer
- Upserting into a target tableData Engineer