Write a query to produce the total number of hours round to 1 digit and charges round to 2 digits for each of the projects represented in the ASSIGNMENT table, sorted by project number. In the SQL Query do the following Select clause: Proj_Num, sum of Assign_hours rounded to 1 place, sum of Assign_charge rounded to 2 places (You will be using SUM and ROUND to achieve the intended result) From: ASSIGNMENT Where clause: not needed because we are not restricting anything here Group by clause: project number column. Since we are using sum to calculate total number of hours and total charges we have to use group by clause for the columns that are not involved in the calculation which is project number column.
Write a query to produce the total number of hours round to 1 digit and charges round to 2 digits for each of the projects represented in the ASSIGNMENT table, sorted by project number.
In the SQL Query do the following
Select clause: Proj_Num, sum of Assign_hours rounded to 1 place, sum of Assign_charge rounded to 2 places (You will be using SUM and ROUND to achieve the intended result)
From: ASSIGNMENT
Where clause: not needed because we are not restricting anything here Group by clause: project number column.
Since we are using sum to calculate total number of hours and total charges we have to use group by clause for the columns that are not involved in the calculation which is project number column.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps