0
0
MySQLquery~10 mins

CROSS JOIN in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all columns from both tables using a CROSS JOIN.

MySQL
SELECT * FROM employees [1] departments;
Drag options to blanks, or click blank then click option'
AINNER JOIN
BRIGHT JOIN
CCROSS JOIN
DLEFT JOIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using INNER JOIN instead of CROSS JOIN.
Forgetting that CROSS JOIN does not need an ON clause.
2fill in blank
medium

Complete the code to count the total number of combinations produced by a CROSS JOIN between two tables.

MySQL
SELECT COUNT(*) FROM products [1] categories;
Drag options to blanks, or click blank then click option'
AINNER JOIN
BCROSS JOIN
CLEFT JOIN
DFULL JOIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using INNER JOIN which filters rows based on a condition.
Using FULL JOIN which is not supported in MySQL.
3fill in blank
hard

Fix the error in the query to correctly perform a CROSS JOIN between two tables.

MySQL
SELECT * FROM orders [1] customers;
Drag options to blanks, or click blank then click option'
ACROSS JOIN
BINNER JOIN
CLEFT JOIN
DRIGHT JOIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using ON clause with CROSS JOIN which causes syntax error.
Confusing CROSS JOIN with INNER JOIN.
4fill in blank
hard

Fill both blanks to create a query that selects all columns from two tables using CROSS JOIN and filters the result with a WHERE clause.

MySQL
SELECT * FROM sales [1] customers WHERE sales.region [2] 'East';
Drag options to blanks, or click blank then click option'
ACROSS JOIN
BINNER JOIN
C=
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using INNER JOIN instead of CROSS JOIN.
Using '!=' instead of '=' in the WHERE clause.
5fill in blank
hard

Fill all three blanks to create a query that uses CROSS JOIN and filters rows where the product price is greater than 100 and the category name is 'Electronics'.

MySQL
SELECT * FROM products [1] categories WHERE products.price [2] 100 AND categories.name [3] 'Electronics';
Drag options to blanks, or click blank then click option'
ACROSS JOIN
B>
C=
DINNER JOIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using INNER JOIN instead of CROSS JOIN.
Using '<' instead of '>' for price comparison.
Using '!=' instead of '=' for category name.