From BU Computer Science
Jump to navigation Jump to search

SQL Lab 1

This lab uses the enrollment data.

Only turn in the sql statements (not the results of the query). You may test your queries out online. (But remember, just because you get the right data back, that does not mean your query is correct!). Turn in an electronic copy or your .sql file.


  1. Display all the courses you have taken (code, number) ordered by code then number. You can first look up your id number. (It is different from what you use at Bethel for privacy reasons). If you prefer, you can do it for any one student of your choice instead.
  2. Display the courses taught by Dr. Bareiss (375) last fall or Dr. Ramos (2361) last spring.
  3. Display the ids of students who were in a math course taught by Prof. Campeau (365 -> but you don't need it) last fall (MATH 070 and MATH 111). Do not use an IN operator.
  4. Display the ids of students who were in a math course taught by Prof. Campeau last fall (MATH 070 and MATH 111). Use the IN operator.
  5. Display all courses taught within the Religion and Philosophy department that are lower level (not 300 or above).
  6. Display the emails and names of all professors in one column with just a space separating the two.
  7. Display all the courses (code, number) that have been taught at least once without an assigned location
  8. Display all the different unique combinations of what days courses have been taught at Bethel
  9. Display the names students whose last first name begins with an 'S' and whose email has yet to be updated from when Bethel changed its name