0
0
MySQLquery~10 mins

Multiple table JOINs 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 join two tables on the customer ID.

MySQL
SELECT customers.name, orders.order_date FROM customers [1] orders ON customers.id = orders.customer_id;
Drag options to blanks, or click blank then click option'
AJOIN
BSELECT
CWHERE
DGROUP BY
Attempts:
3 left
💡 Hint
Common Mistakes
Using SELECT instead of JOIN to combine tables.
Using WHERE without JOIN for table combination.
2fill in blank
medium

Complete the code to join three tables: customers, orders, and products.

MySQL
SELECT customers.name, products.product_name FROM customers JOIN orders ON customers.id = orders.customer_id [1] products ON orders.product_id = products.id;
Drag options to blanks, or click blank then click option'
AWHERE
BGROUP BY
CJOIN
DORDER BY
Attempts:
3 left
💡 Hint
Common Mistakes
Using WHERE instead of JOIN for additional tables.
Forgetting the ON condition for the second join.
3fill in blank
hard

Fix the error in the JOIN clause to correctly join customers and orders.

MySQL
SELECT customers.name, orders.order_date FROM customers JOIN orders [1] customers.id = orders.customer_id;
Drag options to blanks, or click blank then click option'
AWHERE
BON
CUSING
DGROUP BY
Attempts:
3 left
💡 Hint
Common Mistakes
Using WHERE instead of ON in JOIN clause.
Omitting the ON keyword entirely.
4fill in blank
hard

Fill both blanks to join customers, orders, and products with correct conditions.

MySQL
SELECT customers.name, orders.order_date, products.product_name FROM customers [1] orders [2] customers.id = orders.customer_id JOIN products ON orders.product_id = products.id;
Drag options to blanks, or click blank then click option'
AJOIN
BWHERE
CON
DGROUP BY
Attempts:
3 left
💡 Hint
Common Mistakes
Using WHERE instead of ON for join conditions.
Using GROUP BY instead of JOIN.
5fill in blank
hard

Fill all three blanks to join customers, orders, and products with aliases and conditions.

MySQL
SELECT c.name, o.order_date, p.product_name FROM customers c [1] orders o [2] c.id = o.customer_id JOIN products p [3] o.product_id = p.id;
Drag options to blanks, or click blank then click option'
AJOIN
BON
CAS
DWHERE
Attempts:
3 left
💡 Hint
Common Mistakes
Using WHERE instead of ON for join conditions.
Using AS incorrectly for aliases.