Question: 2- Consider the following database. stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each
2- Consider the following database. stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each employee works on each project.
a) Write the SQL code that will list only the distinct project numbers in the ASSIGNMENT table, sorted by project number.
b) Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query should retrieve the assignment number, employee number, project number, the stored assignment charge (ASSIGN_CHARGE), and the calculated assignment charge (calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS). Sort the results by the assignment number.
c) Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours worked for each employee and the total charges stemming from those hours worked, sorted by employee number.
Relational diagram Table name: EMPLOYEE \begin{tabular}{l} Table names \\ \hline \end{tabular} Table name: ASSIGNMENTStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
