fbpx

Practice SQL Single-Row Functions | ACDB

This page provides exercises and solutions to help you practice SQL Single-Row functions. These exercises are based on the ACDB database, and may be performed online or by running the sample schema scripts on your local database server. For additional exercises in other subjects, use this link.
 

String Functions

  1. Display the customer number, first name in lowercase and last name in uppercase for all customers whose customer number is in the range of 80 and 150.
  2. Generating Email Addresses
    1. For all customers – display the last name, first name and email address. The email address will be composed from the first letter of first name concatenated with three first letters of last name concatenated with the string “@mymail.com” (For example : Ram Kedem → RKED@mymail.com).
    2. For all customers – display the last name, first name and email address. The email address will be composed from the first letter of first name concatenated with three last letters of last name concatenated with the string “@mymail.com” (For example : Ram Kedem → RDEM@mymail.com).
  3. Display the last name and the length of the last name for all customers where last name’s length is greater than 9 characters.

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…