Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In SQL, specifically running on Oracle, write the following query: How many students have more than one major? Note: This must be done with a

In SQL, specifically running on Oracle, write the following query: "How many students have more than one major?"

Note: This must be done with a nested query. 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. DO NOT insert any tables or modify any tables. The solution must be one statement. The only thing you can do is to create a single SQL query statement that uses the existing structure defined in the schema.

Based on the information provided, the correct output for the query should be 2.

Database Schema

image text in transcribed

Pertinent Table Information

COURSE TABLE

image text in transcribed

MAJOR TABLE

image text in transcribed

STUDENT TABLE

image text in transcribed

ENROLL TABLE

image text in transcribed

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)

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

Step: 3

blur-text-image

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

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

Example. Evaluate 5n+7 lim 7-00 3n-5

Answered: 1 week ago