Complete the code to select all columns from both tables using CROSS JOIN.
SELECT * FROM table1 [1] table2;The CROSS JOIN returns the Cartesian product of rows from both tables.
Complete the code to count the total number of rows after a CROSS JOIN between two tables.
SELECT COUNT(*) FROM tableA [1] tableB;CROSS JOIN returns all combinations of rows, so counting rows after CROSS JOIN gives the product of row counts.
Fix the error in the query to correctly perform a CROSS JOIN between employees and departments.
SELECT employees.name, departments.name FROM employees [1] departments;CROSS JOIN does not use an ON clause. Remove the ON condition to fix the error.
Fill both blanks to create a query that selects all pairs of product and color using CROSS JOIN and orders by product name.
SELECT products.name, colors.name FROM products [1] colors ORDER BY products.[2];
Use CROSS JOIN to combine all products and colors. Order by the product name.
Fill all three blanks to create a query that selects employee names, department names, and their combined count using CROSS JOIN and GROUP BY.
SELECT employees.[1], departments.[2], COUNT(*) FROM employees [3] departments GROUP BY employees.name, departments.name;
Select employee name and department department_name. Use CROSS JOIN to combine all pairs and count them.