ads/CIS495Homework1.pdf CIs 495 KOK HOMEWORK I Name: Using the tables defined in
ID: 3752990 • Letter: A
Question
ads/CIS495Homework1.pdf CIs 495 KOK HOMEWORK I Name: Using the tables defined in class in CIS database, write the sQL queries for the following questions 1. Count the number of instructors in the CIS department. 2. List the course number and the count of sections for each course that is offered 3. List the name of all the instructors that are not in CiS department but are teaching CIS100 4. ist name and office of each of the member of the CiS department and the number of credits each one teaches. 5. List the name(s) and number of sections of any instructor(s) sections. who teach(es) the most number of 6. List the namets) and the number of courses of any instructorís) who teach(es)Explanation / Answer
Answered first four parts
1.
SELECT COUNT(Instructor.InstructorName)
FROM Section INNER JOIN
Instructor
ON Section.InstructorName = Instructor.InstructorName
WHERE Section.CourseNumber like 'CIS%'
2. SELECT Course_Number, COUNT(DISTINCT SectionNumber)
From Section
GROUP BY Course_Number
3.
SELECT Instructor.InstructorName
FROM Section INNER JOIN
Instructor
ON Section.InstructorName = Instructor.InstructorName
WHERE Section.CourseNumber like 'CIS100'
4.
SELECT DISTINCT Instructor.InstructorName, Course.CourseName, Course.Credits
FROM Section INNER JOIN
Instructor
ON Section.InstructorName = Instructor.InstructorName
INNER JOIN Course ON
Course.CourseNumber = Section.CourseNumber
WHERE Section.CourseNumber like 'CIS%'
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.