Knowee
Questions
Features
Study Tools

Multi Choice Type QuestionWhich of the following should be used to find all the courses taught in the Fall 2009 semester but not in the Spring 2010 semester?Marks : 1Negative Marks : 0Answer hereSELECT DISTINCT course id FROM SECTIONWHERE semester = ’Fall’ AND YEAR= 2009 AND course id NOT IN (SELECT course id FROM SECTION WHERE semester = ’Spring’ AND YEAR= 2010);SELECT DISTINCT course_idFROM instructorWHERE name NOT IN (’Fall’, ’Spring’);SELECT course idFROM SECTIONWHERE semester = 'Spring' AND YEAR= 2010);SELECT COUNT (DISTINCT ID)FROM takesWHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEARFROM teaches

Question

Multi Choice Type QuestionWhich of the following should be used to find all the courses taught in the Fall 2009 semester but not in the Spring 2010 semester?Marks : 1Negative Marks : 0Answer hereSELECT DISTINCT course id FROM SECTIONWHERE semester = ’Fall’ AND YEAR= 2009 AND course id NOT IN (SELECT course id FROM SECTION WHERE semester = ’Spring’ AND YEAR= 2010);SELECT DISTINCT course_idFROM instructorWHERE name NOT IN (’Fall’, ’Spring’);SELECT course idFROM SECTIONWHERE semester = 'Spring' AND YEAR= 2010);SELECT COUNT (DISTINCT ID)FROM takesWHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEARFROM teaches

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct answer is:

SELECT DISTINCT course id FROM SECTION WHERE semester = ’Fall’ AND YEAR= 2009 AND course id NOT IN (SELECT course id FROM SECTION WHERE semester = ’Spring’ AND YEAR= 2010);

This SQL query will select all unique course ids from the SECTION table where the semester is Fall and the year is 2009. It then checks to make sure that these course ids are not in the list of course ids from the SECTION table where the semester is Spring and the year is 2010. This will give you a list of all courses taught in Fall 2009 but not in Spring 2010.

This problem has been solved

Similar Questions

Which statement about the SELECT query design provided above is correct?Note: the Semester field contains either F for Fall semesters or S for Spring semestersthe Semester Year field contains 4-digit numbers representing the yearQuestion 5Select one:a.None of the statements are correct.b.Display the list of enrolments between 2011 and 2013.c.Display the list of enrolments for 2011, as well as for 2013. d.Display the list of enrolments before 2011 or after 2013.

Consider these following tables and only solve the query. Tables: 1) student: s_no (primary key), student_name, course_no (foreign key), age 2) courser-course-no (primary key), course-name.

Give a table:Student (studentId, name, major) Primary key is [studentId, major].Which code snippet will list out students that the major not equals 'IT'?SELECT * FROM Student HAVING major <> 'IT'All of the aboveSELECT * FROM Student s WHERE s.major != 'IT'SELECT * FROM Student GROUP BY major HAVING major <> 'IT'

Write a SELECT statement that returns the LastName and FirstName columns from the Instructors table.Return one row for each instructor that doesn’t have any courses in the Courses table. To do that, use a subquery introduced with the NOT EXISTS operator.Sort the result set by LastName and then by FirstName.

Select the correct answerCourse(course_id,sec_id,semester)Here the course_id,sec_id and semester are __________ and course is a _________.OptionsAttributes, RelationRelations, AttributeTuples, SetTuples, AttributesFinish ClearPrev Next (1)

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.