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. Include your name and label each question (using comments).

Questions:
  1. Display all the courses you have taken (code, number) ordered by code then number. You can first look up your id number. (It may be 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. (Students outside of this class have had their ids and names randomize for FERPA reasons).
  2. Find the ids of Dr. Bareiss and Dr. Ramos. Use that information to display the courses taught by Dr. Bareiss last fall or Dr. Ramos last spring.
  3. Find the id of Prof. Campeau and use it to display the ids of students who were in an engineering course taught by Prof. Campeau last fall (ENGR 101, ENGR 101L, and ENGR 350). Do not use an IN operator.
  4. Display the ids of students who were in an engineering course taught by Prof. Campeau last fall (ENGR 101, ENGR 101L, and ENGR 350). 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 instructors whose last name begins with an 'R' and whose email has yet to be updated from when Bethel changed its name
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine