Combine first_name and country of customer as:<name> from <country>.
select first_name, country, concat(first_name, ' from ', country) as combined_name from customers;
Find customers whose first_name has leading or trailing whitespaces.
select first_name from customers where first_name != trim(first_name);
Remove - from a phone number.
select '123-456-789',
replace('123-456-789', '-', '') as new_phoneretrieve first 2 characters from first_name of customers table.
select left(first_name, 2) from customers;
Retrieve customers’ first names after removing the first (non-space) character.
select first_name, substring(trim(first_name), 2, len(first_name)) as substr_name
Round the number 3.516 to 2 decimal places.
select 3.516, round(3.516, 2) as rounded;
3.520