Provide the MySQL commands for the following queries. Make sure that your queries produce the exact output as shown (row order can be different). Redo Q4, except also showing the name for the instructor's department in the following manner. +--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+ | stuId | fname | lname | major | classId | Instructor deptCode | course | grade | +--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+ | 100005 | Linda | Johnson | CINF | 10003 | CSCI | Introduction to Information Systems | NULL | | 100005 | Linda | Johnson | CINF | 10004 | CSCI | Web Application Development | A- | | 100005 | Linda | Johnson | CINF | 10005 | CINF | Database Development | A- | | 100005 | Linda | Johnson | CINF | 10006 | ITEC | Introduction to Scripting | B+ | | 100006 | Lillian | Johnson | CINF | 10004 | CSCI | Web Application Development | C+ | | 100006 | Lillian | Johnson | CINF | 10005 | CINF | Database Development | A | | 100000 | Tony | Hawk | CSCI | 10000 | CSCI | Data Structures | A | | 100000 | Tony | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A | | 100000 | Tony | Hawk | CSCI | 10002 | CSCI | DBMS | B+ | | 100000 | Tony | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | C | | 100000 | Tony | Hawk | CSCI | 10004 | CSCI | Web Application Development | A- | | 100000 | Tony | Hawk | CSCI | 11001 | CSCI | Design of Database Systems | D | | 100001 | Mary | Hawk | CSCI | 10000 | CSCI | Data Structures | NULL | | 100001 | Mary | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A- | | 100002 | David | Hawk | CSCI | 10000 | CSCI | Data Structures | B- | | 100002 | David | Hawk | CSCI | 10002 | CSCI | DBMS | B+ | | 100002 | David | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | D | | 100004 | Larry | Johnson | ITEC | 10003 | CSCI | Introduction to Information Systems | A | | 100004 | Larry | Johnson | ITEC | 10004 | CSCI | Web Application Development | B+ |
Provide the MySQL commands for the following queries. Make sure that your
queries produce the exact output as shown (row order can be different).
Redo Q4, except also showing the name for the instructor's department in the
following manner.
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+
| stuId | fname | lname | major | classId | Instructor deptCode | course | grade |
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+
| 100005 | Linda | Johnson | CINF | 10003 | CSCI | Introduction to
| 100005 | Linda | Johnson | CINF | 10004 | CSCI | Web Application Development | A- |
| 100005 | Linda | Johnson | CINF | 10005 | CINF |
| 100005 | Linda | Johnson | CINF | 10006 | ITEC | Introduction to Scripting | B+ |
| 100006 | Lillian | Johnson | CINF | 10004 | CSCI | Web Application Development | C+ |
| 100006 | Lillian | Johnson | CINF | 10005 | CINF | Database Development | A |
| 100000 | Tony | Hawk | CSCI | 10000 | CSCI | Data Structures | A |
| 100000 | Tony | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A |
| 100000 | Tony | Hawk | CSCI | 10002 | CSCI | DBMS | B+ |
| 100000 | Tony | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | C |
| 100000 | Tony | Hawk | CSCI | 10004 | CSCI | Web Application Development | A- |
| 100000 | Tony | Hawk | CSCI | 11001 | CSCI | Design of Database Systems | D |
| 100001 | Mary | Hawk | CSCI | 10000 | CSCI | Data Structures | NULL |
| 100001 | Mary | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A- |
| 100002 | David | Hawk | CSCI | 10000 | CSCI | Data Structures | B- |
| 100002 | David | Hawk | CSCI | 10002 | CSCI | DBMS | B+ |
| 100002 | David | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | D |
| 100004 | Larry | Johnson | ITEC | 10003 | CSCI | Introduction to Information Systems | A |
| 100004 | Larry | Johnson | ITEC | 10004 | CSCI | Web Application Development | B+ |
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+
![MariaDB [toyu2]> select * from grade;
| grade | gradePoint |
ΤΑ
| A-
B
B+
B-
C
JUODÓLA.
D+
D-
| F
IP
NULL
NULL
NULL |
-+
15 rows in set (0.001 sec)
MariaDB [toyu2]> select from school;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
MariaDB [toyu2]> select * from school;
| schoolCode | schoolName
| Business
Education
| P
| WX
4.0000
3.6667
3.0000
3.3333
2.6667
2.0000
2.3333
1.6667
1.0000
| BUS
EDU
1.3333
0.6667
0.0000
Human Sciences and Humanities
İScience and Engineering
HSH
| CSE
4 rows in set (0.000 sec)
MariaDB [toyu2]> select * from student;
| stuId | fname
| 100000 | Tony
| 100001 | Mary
100002| David
100003 | Catherine
100004 | Larry
100005 | Linda
100006 | Lillian
100007 | Ben
| 100008 | Bill
100009 | Linda
| 100111 | Cathy
11 rows in set (0.000 sec)
| 1name | major | minor | credits | advisor |
1011 |
1011
Hawk
Hawk
Hawk
| Lim
Johnson
Johnson
Johnson
Zico
Ching
King
CSCI
CSCI
CSCI
ITEC
ITEC
CINF
CINF
NULL
ARTS
ARTS
CINF
CINF
ITEC
CINF
NULL
ENGL
ITEC
NULL
NULL
CSCI
Johanson NULL | NULL
40
35
66
20
66
13 |
18 |
16 |
90 |
125 |
0|
1012
NULL
1017
1015
1016
NULL
NULL
1018
1018](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F373ec5c3-fcc8-4cc5-a897-c792133242cb%2F735553b8-3ee1-4e7c-b7fb-52a1c57cc6ef%2Ff11vfke_processed.png&w=3840&q=75)
![MariaDB [toyu2]> select * from department;
| deptCode | dept Name
ACCT
ARTS
CINF
CINF
CSCI
ENGL
ITEC
MATH
7 rows in set (0.000 sec)
MariaDB [toyu2]> select * from enroll;
| stuId
classId | grade | n_alerts
100000
100001
100002
100000
100000
L
100001
100001
100000
100000
100002
100002
100000
100000
100002
100004
100005
100000
100004
100000
100005
100000
100006
100000
100005
100000
| 100006
100005
100005
100007
| 100007
100008
100007
100000
Accounting
Arts
Computer Information Systems
Computer Science
English
Information Technology
Mathematics
10000 A
10000 NULL
10000
10001
1000
10001
10001
10002
10002
10003
10000
10002 B+
10002
DT
B-
B-
10003
D
10005
10003 A
2000
10005
B+
D+
10003
10004 A-
B+
10004
www
10004
A-
2000
10004 C+
A-
NULL
2000
10005
10000
10006 B+
1011 Paul
1012 Mary
1013 David
1014 Sharon
1015
Daniel
1016
Andrew
4047
1017 | Deborah
1018 Art
10007
0007
10007 C-
10008 A-
11001
Benjamin
Katrina
Smith
Tran
Love
Mannes
Kim
Byre
Gump
NULL
2
2
Ø
22 rows in set (0.000 sec)
MariaDB [toyu2]> select * from faculty;
| facId fname
1019
Yu
1020
Bajaj
1021 Jorginlo | Neymar
!
1
11 rows in set (0.001 sec)
2
2
A
1
A
NULL
1
NULL
NULL
NULL
NULL
4
0
4
1name | deptCode | rank
CINF
ITEC
Allister ARTS
ITEC
ENGL
ACCT
CSCI
CSCI
CSCI
CSCI
CINE
CINF
| schoolCode | numStaff
BUS
HSH
CSE
CSE
HSH
CSE
CSE
Professor
Associate Professor
NULL
Assistant Professor
Professor
Associate Professor
Professor
Assistant Professor
Lecturer
Lecturer
Assistant Professor
10](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F373ec5c3-fcc8-4cc5-a897-c792133242cb%2F735553b8-3ee1-4e7c-b7fb-52a1c57cc6ef%2Fu0lqgyk_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Using joins we can combine two or more tables
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)