Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( Oracle SQL Question) 1) Write an Oracle SQL query without using views or nested queries that finds the list of the IDs of all

( Oracle SQL Question)

image text in transcribed

1) Write an Oracle SQL query without using views or nested queries that finds the list of the IDs of all students who are enrolled in Course_Names: (MATH12 and MATH32 and MATH25) or (MATH62 and MATH64) or (MATH75). The results should be sorted in ascending order.

2) Write a query that finds the IDs and names of all students with at least one project partner who is enrolled in (STATS15 or STATS25) and (STATS32 or STATS34) and (STATS77). The results should be sorted in descending order by the students names. This query should be completed without views or set operations: (MINUS,UNION,INTERSECT)

I think I understand the SELECT and FROM statements for both queries, but need help with understanding how to do the WHERE statements. If you could breakdown and explain whats going on in your answer, that would be awesome since I'm trying to actually understand it, thanks!

Consider a database consisting of the following five tables. Attributes that are underlined have been designated the primary key of their respective tables, and fields with identical names in different tables can be safely assumed to be foreign keys Students (SID, Name, Major) Projects(PID, Project Name) Courses (CID, Cour se_Name) Members(PID, SID) Enrollments (CID, SID) The Project Name and Course Name fields are specified as UNIQUE, and all fields are required except for Major, which may be NULL (to represent undeclared)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions