LastName_Lab1_Output.docx - Query 1 Write a SQL statement...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Query 1: Write a SQL statement to display the course numbers of classes taught by Hammett Glenn. SELECT Course_No FROM CLASS CL INNER JOIN INSTRUCTOR INS on CL.Instructor_ID = INS.Instructor_ID WHERE INS.First_Name = 'Hammett' AND INS.Last_Name = 'Glenn' Query 2: Write a SQL statement to display the course names of the courses taught by an instructor whose id is 415. SELECT Course_Name FROM COURSE CL INNER JOIN CLASS CLA on CL.Course_No = CLA .Course_No INNER JOIN INSTRUCTOR INS on INS.Instructor_ID = CLA .Instructor_ID WHERE INS.Instructor_ID = 415
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Query 3: Write a Query to display the name and office number of all instructors who teach Psy101. (USE NATURAL JOIN) SELECT CONCAT(First_Name , ' ' , Last_Name) as Name , Office_No FROM INSTRUCTOR INS NATURAL JOIN CLASS NATURAL JOIN COURSE WHERE Course_Name = 'Psy101' Query 4: Write a Query to display the semester and the number of courses offered in that semester. Display only the semesters that offer more than five courses.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern