Assignment #1
Simple Queries
1. Write a SELECT statement to list course data sorted by course number. (30 rows)
2. Write a SELECT statement to list zipcodes and their cities in New York State sorted by
zipcode. (123 rows)
3. Write a SELECT statement to list first and last names of all instructors sorted by last name.
(10 rows)
4. Write a SELECT statement to list courses that have the course number 20 as a prerequisite.
(5 rows)
5. Write a SELECT statement to list the last and first names in last name order of students that
are currently employed by the firm Electronic Engineers and have last names starting with
“G”. (2 rows)
SELECT last_name, first_name, employer
FROM student
6. Write the same SELECT statement as #5 but include students who are Electronic Engineers
employees with the last name beginning with S or B. (Hint: Use parentheses in the WHERE
clause to isolate the OR logic). (2 rows)