Question.pdf - Write 10 SQL statements against the STUDENT...

This preview shows page 1 - 2 out of 2 pages.

Write 10 SQL statements against the STUDENT schema. Your statements should run error-free and should be valid. Submit two separate files: one plain text file (.txt or .sql file) with your statements only; Q1. List all instructors. Show salutation in all lower cases, last name in all upper cases, and phone number in the format of '(xxx) xxx-xxxx'. (HINT: use LOWER, UPPER, and SUBSTR function) Q2. List all students (display student_id, first name, last name, street address, zip code, city, and state) who live in New York, NY. Sort results by the last name, and then first name, in descending order. Q3. Display the city in which each instructor lives. List first name, last name, zip, city, and state. Display "N/A" for zip, city, and state if an instructor does not have a zipcode. (HINT: left join INSTRUCTOR and ZIPCODE; use function) Q4. Show the number of instructors who live in NY state and has a street number of 518. (HINT: use string functions such as SUBSTR and INSTR)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture