Question: Write a query that creates a report listing the projectIDs and budgets for each location. After listing each of the projects in a location, the

Write a query that creates a report listing the projectIDs and budgets for each location. After listing each of the projects in a location, the next line of the output should be a budget subtotal for the entire location. An example report follows:

Hint: Use the Union operation to combine a query that computes the sum for each location with a query that lists each individual project. Use a hidden column to control the sort order of the output.
Relations Note: Each table's primary key is underlined. Works Employee Emplo EmpName Dept Salary Manager 101 Alpha HR 200 202 Beta ENGR 250 303 Gamma IT 300 202 404 Delta ENGR 275 202 505 Epsilon HR 325 101 606 Zeta IT 225 404 707 Omega IT 300 303 EmplD Projld Hours 101 Red 5 101 Orange 10 101 Yellow 15 202 Green 20 202 Blue 12 303 Indigo 8 303 Violet 4 303 Red 16 404 Orange 7 404 Yellow 17 505 Green 22 505 Blue 2 505 Indigo 11 606 Violet 13 Project Projld Loc Budget Lead Red NW 1000 707 Orange NE 1100 707 Yellow sw 950 606 Green SE 900 606 Blue NW 1200 505 Indigo sw 1000 404 Violet NW 1150 303 Loc ProjID Budget A1 1000 E 03 700 E E5 800 E Total 2500 N B2 100 N D4 500 N Total 600 S
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
