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+ |
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+
Using joins we can combine two or more tables
Step by step
Solved in 2 steps