0
0
MySQLquery~10 mins

EXPLAIN query analysis 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 show the execution plan of a SELECT query.

MySQL
EXPLAIN [1] * FROM employees;
Drag options to blanks, or click blank then click option'
AUPDATE
BDELETE
CSELECT
DINSERT
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXPLAIN with DELETE or UPDATE without SELECT
Forgetting to put SELECT after EXPLAIN
2fill in blank
medium

Complete the code to analyze a query filtering by department.

MySQL
EXPLAIN SELECT * FROM employees WHERE department [1] 'Sales';
Drag options to blanks, or click blank then click option'
ABETWEEN
BLIKE
CIN
D=
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIKE without wildcards
Using IN with a single value
3fill in blank
hard

Fix the error in the EXPLAIN query by completing the missing keyword.

MySQL
EXPLAIN [1] * FROM employees WHERE salary > 50000;
Drag options to blanks, or click blank then click option'
ASELECT
BFROM
CTABLE
DSHOW
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXPLAIN FROM instead of EXPLAIN SELECT
Omitting SELECT keyword
4fill in blank
hard

Fill both blanks to analyze a query that orders employees by hire date.

MySQL
EXPLAIN SELECT * FROM employees ORDER BY [1] [2];
Drag options to blanks, or click blank then click option'
Ahire_date
Bsalary
CASC
DDESC
Attempts:
3 left
💡 Hint
Common Mistakes
Using salary instead of hire_date
Using DESC when ascending order is intended
5fill in blank
hard

Fill all three blanks to analyze a query that joins employees and departments.

MySQL
EXPLAIN SELECT e.name, d.name FROM employees e [1] departments d ON e.[2] = d.[3];
Drag options to blanks, or click blank then click option'
AJOIN
Bdepartment_id
Cid
DLEFT JOIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using JOIN instead of LEFT JOIN
Mixing column names in ON clause