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
+--------+-------+---------+------------------------------+-------------------+
Step by step
Solved in 2 steps with 2 images