Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to convert the 'name' column to uppercase.
MySQL
SELECT [1](name) FROM employees; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using LOWER instead of UPPER will convert to lowercase.
Using LENGTH returns the string length, not case conversion.
✗ Incorrect
The UPPER function converts all letters in a string to uppercase.
2fill in blank
mediumComplete the code to convert the 'city' column to lowercase.
MySQL
SELECT [1](city) FROM customers; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using UPPER will convert to uppercase, not lowercase.
CONCAT joins strings but does not change case.
✗ Incorrect
The LOWER function converts all letters in a string to lowercase.
3fill in blank
hardFix the error in the code to convert 'product_name' to uppercase.
MySQL
SELECT [1](product_name) FROM products; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Missing closing parenthesis causes syntax error.
Using LOWER instead of UPPER changes case incorrectly.
✗ Incorrect
The function call must be UPPER(product_name) with parentheses around the column name.
4fill in blank
hardFill both blanks to convert 'last_name' to lowercase and alias it as 'lname'.
MySQL
SELECT [1](last_name) AS [2] FROM staff;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using UPPER instead of LOWER changes case wrongly.
Using 'lastname' as alias instead of 'lname' does not match the instruction.
✗ Incorrect
Use LOWER to convert to lowercase and alias the column as lname.
5fill in blank
hardFill all three blanks to select 'department' in uppercase, 'manager' in lowercase, and alias 'manager' as 'mgr'.
MySQL
SELECT [1](department), [2](manager) AS [3] FROM company;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up UPPER and LOWER functions.
Using wrong alias names.
✗ Incorrect
Use UPPER for 'department', LOWER for 'manager', and alias 'manager' as mgr.