Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In SQL, specifically running on Oracle, write the following query: \" Find the n

ID: 3886489 • Letter: I

Question

In SQL, specifically running on Oracle, write the following query: " Find the names and majors of students who are taking one of the World History courses."

Note: Creation of temporary tables to solve the problem is not permitted. It must be completed in a single query statment. You may not create any tables nor can you alter the structure of the database. The only thing you can do is to create a single SQL query statement that uses the existing structure defined in the schema.

Please provide output.

Database Schema

Pertinent Table Information

I am only posting the Major, Student, and Enroll table since the other tables are not relevant for this specific problem.

MAJOR TABLE

STUDENT TABLE

ENROLL TABLE

dept(dname, numphds) course(cno, cname, dname) prof (pname, dname) section(cno, dname, sectno, pname) student(sid, sname, sex, age, gpa) major(sid, dname) enroll(sid, cno, dname, sectno, grade)

Explanation / Answer

Considering that data is also mapped in ONE TO MANY links by observing the tables.

Following command will work:

select distinct a.sname,b.dname from student a ,major b,enroll c where a.sid = c.sid and b.sid = c sid and lower(c.dname) = 'history'

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote