Single Row Functions
Single Row Functions
Preliminary Period
Single-Row Functions
Score Equivalent:
No error/Correct Query = 5points
1-3 errors = 3points
4-5 errors = 1point
More than 5 errors/Not running = No point
1. Create a new email, which will contain the first 3 letters of the first name and last name and
employee id. Sort the data in ascending order. Do not use Concat Operator ||. See sample output
below for additional character strings and formatting.
Sample Output:
SELECT CONCAT(
CONCAT(
CONCAT(
CONCAT(LOWER(SUBSTR(first_name,1,3)) , UPPER(SUBSTR(last_name,1,3))) ,
'_') , SUBSTR(employee_id,1,3)), '@yahoo.com') AS "New Email"
FROM employees
ORDER BY "New Email";
2. Starting with the string “Oracle Internet Academy”, pad the string to create
****Oracle****Internet****Academy****
SELECT MONTHS_BETWEEN
(TO_DATE('01-01-2020','MM-DD-YYYY'),
TO_DATE('03-16-2019','MM-DD-YYYY') ) "Months"
FROM DUAL;
4. What’s the position of “I” in “Oracle Internet Academy”? Label as Position. Use the string “Oracle
Internet Academy” to produce the following output below. Label this column as The Net. Write your
SQL Statement
.