Complete the code to select the first 3 characters of the name column.
SELECT SUBSTR(name, 1, [1]) FROM employees;
The SUBSTR function extracts a substring starting at position 1 with length 3, giving the first 3 characters.
Complete the code to convert the email column to lowercase.
SELECT [1](email) FROM users;The LOWER function converts all letters in the string to lowercase.
Fix the error in the code to find the position of '@' in the email column.
SELECT INSTR(email, [1]) FROM contacts;The INSTR function needs the character '@' as a string, so it must be in quotes.
Fill both blanks to trim spaces and convert the username column to uppercase.
SELECT [1]([2](username)) FROM users;
First TRIM removes spaces, then UPPER converts to uppercase.
Fill all three blanks to create a dictionary of usernames and their email domains (part after '@').
SELECT [1], SUBSTR(email, INSTR(email, [2]) + 1) AS domain FROM users WHERE email [3] '%@%';
We select username, extract domain after '@', and filter emails containing '@' using LIKE.