. Write SQL retrieval commands for each of the following queries: a. Display the course ID and course name for all courses with an MC prefix. b. Display all courses for which Professor Newton has been qualified. c. Display the class roster, including student name, for all students enrolled in section 1003 of MC123 and section 1005 of MC222.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter4: Analyzing And Charting Financial Data
Section: Chapter Questions
Problem 14RA
icon
Related questions
Question

1. Write SQL retrieval commands for each of the following queries:
a. Display the course ID and course name for all courses with an MC prefix.
b. Display all courses for which Professor Newton has been qualified.
c. Display the class roster, including student name, for all students enrolled in section 1003 of MC123 and section 1005 of MC222.

2. Write an SQL query to answer the following question: Which instructors are qualified to teach MS211 and MS111?

3. Write an SQL query to answer the following question: Is any instructor qualified to teach MS111 and not qualified to teach MS232?

4. Write SQL queries to answer the following questions: How many students were enrolled in section 1003 during semester I-2021?

5. How many students were enrolled in MS232 during semester I-2021?

6. Write an SQL query to answer the following question: Which students were not enrolled in any courses during semester 1-2021?

Instructions:
• Together with this questionnaire is a list of tables with the corresponding records. From
the list create a database and these tables within this database.
It is up to you what name you will give to your database. However, you have to use the
given table names and the columns when you create the tables.
Insert the rows to their respective tables.
• With this database, answer the following questions/problems.
Your answer are the SQL statement that will give the answer to the question/problem and
the result the SQL statement. Write the answer after each of the question or problem.
• The SQL statement must use either a join or subquery (whichever is appropriate to
address the question/problem).
Transcribed Image Text:Instructions: • Together with this questionnaire is a list of tables with the corresponding records. From the list create a database and these tables within this database. It is up to you what name you will give to your database. However, you have to use the given table names and the columns when you create the tables. Insert the rows to their respective tables. • With this database, answer the following questions/problems. Your answer are the SQL statement that will give the answer to the question/problem and the result the SQL statement. Write the answer after each of the question or problem. • The SQL statement must use either a join or subquery (whichever is appropriate to address the question/problem).
Table: STUDENT
Table: FACULTY
STUDENTID STUDENTNAME
FACULTYID FACULTYNAME
Johnny Bravo
Plunger Boy
Dexter
38214
62662
Einstein
Porsche
Newton
Plato
12365
63636
66952
77256
25631
Astro Boy
72577
Table: QUALIFIED
Table: COURSE
FACULTYID COURSEID
COURSEID COURSENAME
62662
MS111
MS111
Systems Analysis
62662
MC123
MC123
Data Structures
77256
MS211
MS211
Compilers
Network Security
77256
MC222
МC222
63636
MS111
MS232
IT Audit
63636
МC222
72577
MS211
72577
MS232
Table: ENROLLMENT
Table: SECTION
STUDENTID SECTIONNO SEMESTER
SECTIONNO SEMESTER COURSEID
38214
1000
1-2021
1000
1-2021
MS111
38214
1003
1-2021
1001
1-2021
MS111
66952
1003
1-2021
1002
1-2021
MC123
66952
1005
1-2021
1003
1-2021
MC123
12365
1001
1-2021
1004
1-2021
MS211
25631
1007
1-2021
1005
1-2021
МC222
1006
1-2021
МC222
1007
1-2021
MS232
Transcribed Image Text:Table: STUDENT Table: FACULTY STUDENTID STUDENTNAME FACULTYID FACULTYNAME Johnny Bravo Plunger Boy Dexter 38214 62662 Einstein Porsche Newton Plato 12365 63636 66952 77256 25631 Astro Boy 72577 Table: QUALIFIED Table: COURSE FACULTYID COURSEID COURSEID COURSENAME 62662 MS111 MS111 Systems Analysis 62662 MC123 MC123 Data Structures 77256 MS211 MS211 Compilers Network Security 77256 MC222 МC222 63636 MS111 MS232 IT Audit 63636 МC222 72577 MS211 72577 MS232 Table: ENROLLMENT Table: SECTION STUDENTID SECTIONNO SEMESTER SECTIONNO SEMESTER COURSEID 38214 1000 1-2021 1000 1-2021 MS111 38214 1003 1-2021 1001 1-2021 MS111 66952 1003 1-2021 1002 1-2021 MC123 66952 1005 1-2021 1003 1-2021 MC123 12365 1001 1-2021 1004 1-2021 MS211 25631 1007 1-2021 1005 1-2021 МC222 1006 1-2021 МC222 1007 1-2021 MS232
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning