Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The database schema contains a rider_student table and a rider_major table. The rider_student table contains some basic information about rider students. The rider_major table contains

The database schema contains a rider_student table and a rider_major table. The rider_student table contains some basic information about rider students. The rider_major table contains basic information about majors offered at Rider. The clubs table contains a club_id and the name/description of the corresponding club.The structure of these tables is as follows.

rider_student

Column Data Type Description
student_id integer the primary key
first_name varchar(25) student first name
last_name varchar(25) student lats name
major_id integer the ID of the student's major; a foreign key for the major_id in the rider_major table

rider_major

Column Data Type Description
major_id integer the primary key
major_name varchar(50) student first name
major_description varchar(100) student last name

clubs

Column Data Type Description
club_id integer the primary key
club_descr varchar(50) description/name of the club

SQL Subqueries

1. Write a SQL subquery which determines which records in the rider_student table have majors which are not in the rider_major table. 2. Write a SQL subquery which determines which records in the rider_major table have a major which is not currently selected by any students.

3. Write an outer join to retrieve records from the rider_student table and the clubs table. This select statement should retrieve rider_student table records whether or not they have corresponding records in the clubs table.

4. Write a non-correlated subquery to determine which records in the rider_student table have no corresponding records in the clubs table.

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Is how things are said consistent with what is said?

Answered: 1 week ago

Question

Has the priority order been provided by someone else?

Answered: 1 week ago