Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The problems on the next page require writing SQL scripts for Oracle. You should submit a script for each of these problems in separate text

image text in transcribedimage text in transcribedimage text in transcribed

The problems on the next page require writing SQL scripts for Oracle. You should submit a script for each of these problems in separate text files. Please remember that PDFs and MS Word documents are not text files. The script should be able to be executed with the start command using the version of Oracle provided by IT support. Use two hyphens to begin a single-line comment, or use the C-style syntax (/* ... */) for multi-line comments. 4. Write a query that creates a report listing the projectlDs 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: (10 points) Loc ProjID Budget E A1 1000 E C3 700 E E5 800 E Total 2500 N B2 100 N D4 500 N Total 600 S 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 EmplD 101 101 Hours 5 10 Employee EmplD 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 101 202 202 303 8 ProjiD Red Orange Yellow Green Blue Indigo Violet Red Orange Yellow Green Blue Indigo Violet 303 303 404 404 505 4 7 17 22 505 2 505 Project ProjiD Red Orange Yellow Green Blue Indigo Violet 606 Loc Budget Lead NW 1000 707 NE 1100 707 SW 950 606 SE 900 606 NW 1200 505 SW 1000 404 NW 1150 303

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions