USING ORACLE 1. Create a table for this activity 2. Within the Employees table, each manager_id...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
USING ORACLE 1. Create a table for this activity 2. Within the Employees table, each manager_id is the manager of one or more employees who each have a job_id and earn a salary. For each manager, what is the total salary earned by all of the employees within each job_id? Write a query to display the Manag-er_id, job_id, and total salary. Include in the result the subtotal salary for each manager and a grand total of all salaries. 3. Amend the previous query to also include a subtotal salary for each job_id regardless of the manager_id. 4. Using GROUPING SETS, write a query to show the following groupings: department_id, manager_id, job_id • manager_id, job_id. department_id, manager_id 5. Execute this Grouping Functions and give the results: SELECT department_id, job_id, SUM(salary), GROUPING(department_id) AS "Dept sub total", GROUPING(job_id) AS "Job sub total" FROM tbl employees WHERE department_id < 50 GROUP BY CUBE (department_id, job_id) USING ORACLE 1. Create a table for this activity 2. Within the Employees table, each manager_id is the manager of one or more employees who each have a job_id and earn a salary. For each manager, what is the total salary earned by all of the employees within each job_id? Write a query to display the Manag-er_id, job_id, and total salary. Include in the result the subtotal salary for each manager and a grand total of all salaries. 3. Amend the previous query to also include a subtotal salary for each job_id regardless of the manager_id. 4. Using GROUPING SETS, write a query to show the following groupings: department_id, manager_id, job_id • manager_id, job_id. department_id, manager_id 5. Execute this Grouping Functions and give the results: SELECT department_id, job_id, SUM(salary), GROUPING(department_id) AS "Dept sub total", GROUPING(job_id) AS "Job sub total" FROM tbl employees WHERE department_id < 50 GROUP BY CUBE (department_id, job_id)
Expert Answer:
Answer rating: 100% (QA)
Step 1 Create an Employees Table You can create the Employees table using the following SQL statement sql CREATE TABLE Employees employeeid NUMBER PRI... View the full answer
Related Book For
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young
Posted Date:
Students also viewed these databases questions
-
A. Assume the following Keynesian Model of the economy C = 60 + 0.8QD QD = Q - T (taxes are levied in lump sums) IP= 100; G = 200; T = 200 6. By this exercise, is deficit spending superior to...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A study was conducted on a sample of 53 patients presenting with prostate cancer who had also undergone a laparotomy to ascertain the extent of nodal involvement (Collett 1991). The result of the...
-
A clinical study is established to determine if the results of a screening stress test can be used as a predictor of the presence of heart disease. The study enrolls 100 participants who undergo a...
-
Assuming the upward reaction of the ground on beam AB to be uniformly distributed, (a) Draw the shear and bending moment diagrams, (b) Determine the maximum absolute values of the shear and bending...
-
Explain cost-plus pricing. What are some flaws of cost-plus pricing?
-
Analyze the Frank-Kamenetskii problem for the three standard geometries of slab, cylinder, and sphere. You will need to discretize the operators suitably for the cylinder and sphere. Plot the...
-
A hair dryer may be idealized as a circular duct through which a small fan draws ambient air and within which the air is heated as it flows over a coiled electric resistance wire. Surroundings, Tur...
-
A dataset is given below. Calculate the odds ratio to assess the relationship between visiting a petting zoo and becoming infected by E. coli. Interpret the result. Got Sick (Cases) Did Not Get Sick...
-
The remote island nations of Nearway and Farway produce fish and coconuts and have recently decided to trade with one another. Use the table to answer the following questions: a. Calculate the...
-
A mathematical model designed to handle decision problems with multiple outcomes measured in different units is ___________ a. mixed-integer programming b. integer programming c. the branch and bound...
-
A company's ROE 19.4 % and dividents payable ratio of 30% what is the sustainable growth rate?
-
What is an equilibrium price is ? Answer with example.
-
Smith Technologies Corporation has a constant growth rate of 3% per year and its stock currently sells for $27 a share.The last dividend was $1.50.The firm's beta is 1.3, the risk-free rate is 4%,...
-
A bond issued by Google Corp. has a face value of $1000, matures in 4 years and has a 7 percent annual coupon. It currently sells at a yield to maturity of 8 percent. Calculate: (a) Current yield.
-
2. The stock price for Parkside Industries is currently $88.75. The company's PE ratio is expected to remain between 10 and 12 for the next five years. The current dividend is $4.28 per share...
-
Calculate the expected return from a stock with a beta coefficient of 1.16 if there is a 11.2% expected rate of return from the market and a risk-free rate of 4.2%. Round the final answer to one...
-
In a certain school district, 3% of the faculty use none of their sick days in a school year. Find the probability that 5 faculty members selected at random used no sick days in a given year.
-
What are some critical dimensions along which to measure regulatory and social processes in the operating processes part of the Balanced Scorecards process perspective?
-
Give an example of why using units, rather than the value of the products produced, in the numerator of a productivity ratio may give a misleading picture of the process that produced that output.
-
What is the additional cost if a unit rejected at inspection can be reworked to meet quality standards by performing some additional operations?
-
Suppose we wish to estimate the probability of a rare event (such as a default probability). Let the random variable \(X\) be equal to 1 if the event occurs and to zero otherwise. Then...
-
Consider a 10-year zero-coupon bond with face value \(\$ 100\). The interest rate is fixed at 5\%. The credit spread for the bond is estimated to be \(1 \%\) (except in part (a)). Calculate: (a) The...
-
Consider a total return swap of a coupon bond versus a fixed-rate payment. Discuss whether the payoff is path dependent.
Study smarter with the SolutionInn App