Question: PART ONE SQL practices. Question 1 Scenario: Find all courses that have no students enrolled in any section. Question: Write a query to display Course
PART ONE SQL practices.
Question
Scenario: Find all courses that have no students enrolled in any section.
Question: Write a query to display CourseNo and Description for courses that do not have any student enrolled, using a single join.
Hint: Use a LEFT JOIN between Course and Section.
Question
Scenario: You need to identify instructors who are not currently teaching any sections.
Question: Write a query to list InstructorId FirstName, and LastName of instructors who do not have any assigned sections, using a single join.
Hint: Use a LEFT JOIN between Instructor and Section.
Question
Scenario: Identify students who report to specific employer.
Question: Write a query to show StudentId FirstName, LastName, and Employer for all students who are employed by an employer name starts with Bu
Hint: Use the Student table only since this does not require a join.
Question
Scenario: Find instructors who do not have their zip codes listed in the Zipcode table.
Question: Write a query to display InstructorId FirstName, LastName, and Zip for instructors without a matching entry in the Zipcode table using a single join.
Question
Scenario: Show the section numbers for the courses that dont have prerequisites.
Question: Write a query to show CourseNo Section No Description, and the Prerequisites
Hint: Jon section and course tables.
PART TWO SQL practiceschallenges
Question: Write five queries where you use any of the following joins:
INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
Full OUTER JOIN
For each query, you must:
Come up with a scenario from the Student Schema where this join would be necessary.
Clearly state the question you are answering eg include the attribute you need to display
Write the SQL statement that solves the question.
Provide the expected output based on the given data.
Rubric points per query:
Scenario points: The scenario is realistic and clearly explains why this type of join is needed.
Question points: The question clearly specifies which attributes to display
SQL Statement points: The SQL query correctly implements the specified join with accurate syntax.
Output points: The expected output is clearly shown and matches what the query would produce.
Example Breakdown:
Example Scenario for LEFT OUTER JOIN:
Scenario: You want to list all students and the sections they are enrolled in including students who have not yet enrolled in any section.
Question: Display StudentId FirstName, LastName, and SectionId for all students.
SQL statement here
o xxx
Output is here
o xxx
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
