0
0
SQLquery~10 mins

UPPER and LOWER functions in SQL - Interactive Code Practice

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

Complete 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'
ALENGTH
BUPPER
CLOWER
DCOUNT
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.
2fill in blank
medium

Complete 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'
ALOWER
BSUBSTR
CTRIM
DUPPER
Attempts:
3 left
💡 Hint
Common Mistakes
Using UPPER will convert text to uppercase, not lowercase.
TRIM and SUBSTR do not change text case.
3fill in blank
hard

Fix 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'
ACOUNT
BLOWER
CLENGTH
DUPPER
Attempts:
3 left
💡 Hint
Common Mistakes
Using LOWER instead of UPPER changes text to lowercase.
Forgetting the closing parenthesis causes syntax errors.
4fill in blank
hard

Fill 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'
ALOWER
BUPPER
Clname
Dlastname
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.
5fill in blank
hard

Fill 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'
ALOWER
BUPPER
Ccontact
Dphone
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up UPPER and LOWER functions.
Using wrong alias names that do not match the instruction.