Problem Statement
When is a CROSS JOIN the correct choice?
Explanation
A cross join returns every combination of rows from both inputs. It is useful for generating grids or filling a date series crossed with categories.
Use with care. Without a subsequent filter, the row count is rows(A) × rows(B), which can explode quickly.
Code Solution
SolutionRead Only
SELECT p.product_id, d.dt FROM products p CROSS JOIN dates d;
