Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Consider the following database. It has two tables: Fac contains info about faculty Student contains info about students. Complete the following individual Queries using SQL

Consider the following database. It has two tables: Fac contains info about faculty Student contains info about students.

image text in transcribed

image text in transcribed

Complete the following individual Queries using SQL code (try using only SELECT, WHERE/WHERE IN, FROM, GROUP BY, HAVING,AND,etc..):

QA) For each student who is a freshman in the Computer Department (CSC-major), list number, name, age, and gpa.

QB) For each student who has a GPA

QC) For each student who is a Freshman in the Biology department, list number, name, age, and a value called Expected age as a Senior (which shows their age three years from now, expected age as a senior).

QD) List number, and name of each faculty who resides in the building X (That is, office number starts with the letter X).

QE) For each department, list the major and the maximum age, average gpa, and counter of its students.

QF) For each faculty, list his or her number and the average gpa and count of his or her senior advisees.

QG) For each senior student, list number, name, and gpa in the order that shows highest gpa on the top and the lowest at the bottom.

QH) List the advisor number, of any advisor who has more than one student with the GPA above 3.0. The display should also include a count of such advisees.

QI) For the faculty member named Jones list faculty name, number, rank, and all advisees (in terms of student number and name) who are NOT seniors. Sort the result by advisee names.

QJ) List the number, name and gpa, for all students who have a gpa higher than the average. List the information in the descending order of gpa.

QK) List student number and name in the department that does not have more than 6 students.

QL) List each department by its major title, along with a count of award candidate students who have a gpa >3.0.

QM) Design a single query to list the department (by major) which has the most students (i.e., count of student = max).

QN) Design a single query to list the department (by major) which has the most award candidate students (i.e., count of candidate student = max).

Fac AdvNum Name Rank Officel Yrs Worked A10 A20 A30 A40 A50 ones Full Prof B406 Smith Asst Prof Y310 Bradly Full Prof X23-4 Anders Instructor X208 Baker Asst Prof B402 12 4 10 2 14 Student StNum St Major class |gpa AdvNum Name age Al Matt Nicole enny Bob Amanda 30 CSC JR Cindy Fred 10 s18 S24 s28 s34 539 S49 54 s55 s56 s65 s71 s77 s78 s88 S96 s99 2.5 A40 3.7 A30 3.2 A10 3.2 A30 2.5 A40 2.6 A20 3.6 A40 1.5 A50 3.6 A10 4 A50 2.9 A10 2.8 A40 3 A50 3 A10 3.5 A50 3.5 A20 2A30 20 BIO R 21ENG UR 24ENG SR 25 BIO FR 20 CSC FR Sam Alisha Hal John Al Ed Lisa Sam 30 CSC UR 20BIO FR 30 ENG so 22 CSC SO 20 BIO SO 40 CSC SR 17 CSC FR 19ENG SR 25 CSC R 30 ENG FR 45 BIO R

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

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students explore these related Databases questions

Question

How We Listen?

Answered: 3 weeks ago