Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to convert the 'name' column to uppercase.
SQL
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 text to lowercase.
Using LENGTH or COUNT will not change text case.
✗ Incorrect
The UPPER function converts text to uppercase letters.
2fill in blank
mediumComplete the code to convert the 'city' column to lowercase.
SQL
SELECT [1](city) FROM locations; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using UPPER will convert text to uppercase, not lowercase.
TRIM and SUBSTR do not change text case.
✗ Incorrect
The LOWER function converts text to lowercase letters.
3fill in blank
hardFix the error in the code to convert 'product_name' to uppercase.
SQL
SELECT [1](product_name) FROM products; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using LOWER instead of UPPER changes text to lowercase.
Forgetting the closing parenthesis causes syntax errors.
✗ Incorrect
The function name UPPER is correct, but the code is missing a closing parenthesis. The blank is for the function name.
4fill in blank
hardFill both blanks to convert 'last_name' to lowercase and alias it as 'lname'.
SQL
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 text to uppercase.
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 uppercase 'first_name', lowercase 'email', and alias 'phone_number' as 'contact'.
SQL
SELECT [1](first_name), [2](email), phone_number AS [3] FROM contacts;
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 that do not match the instruction.
✗ Incorrect
Use UPPER for 'first_name', LOWER for 'email', and alias 'phone_number' as contact.