List the ids, first names, last names, majors, minors, and advisor's faculty ids of students majoring or minoring in CSCI and having a faculty advisor in the following manner. +--------+-------+-------+-------+-------+---------+ | stuId | fname | lname | major | minor | advisor | +--------+-------+-------+-------+-------+---------+ | 100000 | Tony | Hawk | CSCI | CINF | 1011 | | 100001 | Mary | Hawk | CSCI | CINF | 1011 | | 100002 | David | Hawk | CSCI | ITEC | 1012 | | 100009 | Linda | King | ARTS | CSCI | 1018 | +--------+-------+-------+-------+-------+---------+ 4 rows in set (0.000 sec) [2] Show the information (id, fname, lname and major program name) of all students enrolled in the class 10003 in the following manner. +--------+-------+---------+------------------------------+-------------------+ | stuId | fname | lname | major | class 10003 grade | +--------+-------+---------+------------------------------+-------------------+ | 100000 | Tony | Hawk | Computer Science | C | | 100002 | David | Hawk | Computer Science | D | | 100004 | Larry | Johnson | Information Technology | A | | 100005 | Linda | Johnson | Computer Information Systems | NULL | +--------+-------+---------+------------------------------+------------
Provide the MySQL commands for the following queries. Make sure that your
queries produce the exact output as shown (row order can be different).
[1] List the ids, first names, last names, majors, minors, and advisor's faculty ids of
students majoring or minoring in CSCI and having a faculty advisor in the following
manner.
+--------+-------+-------+-------+-------+---------+
| stuId | fname | lname | major | minor | advisor |
+--------+-------+-------+-------+-------+---------+
| 100000 | Tony | Hawk | CSCI | CINF | 1011 |
| 100001 | Mary | Hawk | CSCI | CINF | 1011 |
| 100002 | David | Hawk | CSCI | ITEC | 1012 |
| 100009 | Linda | King | ARTS | CSCI | 1018 |
+--------+-------+-------+-------+-------+---------+
4 rows in set (0.000 sec)
[2] Show the information (id, fname, lname and major program name) of all
students enrolled in the class 10003 in the following manner.
+--------+-------+---------+------------------------------+-------------------+
| stuId | fname | lname | major | class 10003 grade |
+--------+-------+---------+------------------------------+-------------------+
| 100000 | Tony | Hawk | Computer Science | C |
| 100002 | David | Hawk | Computer Science | D |
| 100004 | Larry | Johnson | Information Technology | A |
| 100005 | Linda | Johnson | Computer
+--------+-------+---------+------------------------------+-------------------+
![MariaDB [toyu2]>
| Tables_in_toyu2
| class
course
department
| enroll
| faculty
| grade
| school
| student
-+
8 rows in set (0.001 sec)
MariaDB [toyu2]> select * from class;
| classId | courseId | semester | year | facId | room |
1011 D241
1011
D242
1012
D136
1014
D241
1014
D241
1015
D237
1019 | D217
1928 | B191
1018
D241
2020
1011
D241
2020 |
1012
D242
2020 |
1013
D136
2020 |
1016 D217
2020 | 1918 | B191 |
-+
10000
10001
10002
10002
10003
10005
10004
10004
10005
10000
10006
10000
10007
10000
10008
10000
11000
11001
11002
11003
11004 |
2000 Fall
2001
Fall
2002 Fall
2020 Fall
2021 Fall
2040 Fall
2041 Fall
2060
Fall
show tables;
2080 Fall
2000 | Spring
2001 | Spring
2002 | Spring
2020 | Spring
2061 | Spring
2000 CSCI
2001 CSCI
2002 CSCI
2020 | CINF
2021 | CINF
2040 ITEC
2011
2041
ITEC
14 rows in set (0.000 sec)
MariaDB [toyu2]> select from course;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to y
MariaDB [toyu2]> select * from course;
| courseId | rubric | number | title
3050
2060 ENGL
2061 | ENGL
2080 | ARTS
2090 ACCT
| ACCT
| ARTS
CINF
2019
2019
2019 |
2019 |
2010
2019 |
2019 |
2019
2019 |
2010
2019
3333 | Data Structures
4333
5333
2221
3321
5242
3312
1410
1311
3311
3333
Design of Database Systems
DBMS
4320
2235
3335 | Database Development
Introduction to Information Systems
Web Application Development
no
Introduction to Scripting
English I
English II
| Hindu Arts
| Managerial Accounting
11 rows in set (0.002 sec)
MariaDB [toyu2]> select * from department;
| deptCode | deptName
| schoolCode | numStaff
| Accounting
Arts
| BUS
HSH
| Computer Information Systems | CSE
10 |
5
5|
| credits |
3
3
3
3
3
3
3
4|
3
3
3 |](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F373ec5c3-fcc8-4cc5-a897-c792133242cb%2F76df5b9c-50eb-42c5-90bb-e2e1eae1c460%2Fqv14d4c_processed.png&w=3840&q=75)
![MariaDB [toyu2]>
| facId | fname
1011 Paul
1012
1013
1014
Sharon
1015 Daniel
1915
1916
1016 Andrew
1017 Dehors
1917
Deborah
1018
1918 Art
1019
A
A-
B
Mary
David
B+
B-
с
C+
D+
D-
F
| IP
P
| WX
1020
Benjamin Yu
Katrina
Bajaj
1021 Jorginlo Neymar
11 rows in set (0.001 sec)
MariaDB [toyu2]> select * from grade;
I grade | gradePoint |
|
select * from faculty;
| 1name | deptCode | rank
Smith
Tran
Love
Mannes
Kim
Byre
Gump
4.0000
3.6667
3.0000
3.3333
2.6667
2.0000
2.3333
1.6667
1.0000
1.3333
20
0.6667
20000
0.0000
NULL
NULL
NULL
CSCI
CSCI
CSCI
CSCI
CINF
CINE
CINF
ITEC
ITEC
Allister ARTS
ITEC
Business
Education
ENGL
ACCT
BUS
EDU
HSH
| CSE
4 rows in set (0.000 sec)
MariaDB [toyu2]> select * from student;
| stuId
fname
100000 Tony
100001 Mary
100002 David
Professor
Associate Professor
NULL
Assistant Professor
Professor
Associate Professor
Professor
Assistant Professor
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 corresponds to your MariaDB se
MariaDB [toyu2]> select * from school;
| schoolCode
schoolName
Lecturer
Lecturer
Assistant Professor
Human Sciences and Humanities
| Science and Engineering
1name | major | minor | credits
Hawk
CINF
Hawk
CINF
Hawk
100003 Catherine Lim
100004| Larry
100005 | Linda
CSCI
CSCI
CSCI
ITEC
ITEC CINF
Johnson ITEC NULL
Johnson CINF ENGL
40
35
66
20
66
13
advisor
1011
1011
1012
NULL
1017
1015](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F373ec5c3-fcc8-4cc5-a897-c792133242cb%2F76df5b9c-50eb-42c5-90bb-e2e1eae1c460%2F2i79a7o_processed.png&w=3840&q=75)

Step by step
Solved in 2 steps with 2 images









