SQL – Joins, Functions
Q1. List all instructors. Show salutation in all decrease times, ultimate name in all pinnacle
times and contact number within the layout of '(xxx) xxx-xxxx'. (HINT: use LOWER, UPPER
and SUBSTR characteristic SUBSTR(cellphone, 1,threetelephone, four,3 '-' phone, 7,four)
Q2. List all college students (display student_id, first name, last call, avenue deal with,
zipcode, metropolis, and nation) who live in New York, NY. Sort results thru ultimate call,
and then first call, in descending order.
SELECT scholar.Student_id, scholar.First_name, pupil.Last_name, student.Street_address,
INNER JOIN zipcode ON student.Zip = zipcode.Zip
WHERE zipcode.State = 'NY'
ORDER BY last_name DESC, first_name;
Q3. Display the metropolis in which every trainer lives. List first name, remaining call, zip,
town, and nation. Display "N/A" for zip, city, and country if an instructor does no longer have