Suppose you have the following EMPLOYEES, CITY and EMPSAL tables. [7 marks] EMPLOYEES EID Fams 55...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose you have the following EMPLOYEES, CITY and EMPSAL tables. [7 marks] EMPLOYEES EID Fams 55 Asad 36 B 57 All 58 Mohmed M 59 M 60 Amal F CITY CITYID EGender ECTTV Beal 400 M M M CITYNAME IZKI NIZWA ALSOUQ BAHLA MANAH MARFAA 3 350 300 150 900 100 EMPSAL EID Bal Badt Allew Graal Retud Write a PL/SQL code to calculate Basic allowance, Gross Salary and Retirement deduction for each employee in the EMPLOYEE table. a)Apply the following criteria to calculate the Basic allowance (Basic Allow). (Basic Salary(BSal( Basic allowance (Basic Allow Isal 200 BSal <400 2200 Sal 2400 of BiSal 7% 10% of Bal 15% of Bal »Calculate the Gross salary (GrossSal) using the formula:- Gross salary Basic salary + Basic allowance Calculate the Retirement Deduction (RetDeduc) using the formula:- Retirement Deduction -2% of Gross salary Insert the necessary values as a new record into the EMPSAL table for each employee. Finally, display the following details for each employee. Sample Output EMBED 55 55 56 57 58 59 40 Salary 841lowance Gsalary Deduction City 30 13.8 MARF 10 13.8 MARFAR 7.7 IZKI 6.6 NIZA 160.5 3.21 1035 20.7 107 400 GOD 350 300 150 900 100 35 30 10.5 135 630 6:30 385 330 AL SOUD ALSOUG 2.14 BAILA I Objectives This problem set will introduce you to the Oracle Application express environment for PL/SQL programming. In this problem set you will write programs that uses composite record variable, user-defined variables, conditional structure and loops in PL/SQL. Program 1 Students Student ID Student Name 1 4 5 6 7 8 3 Amia Anwar Man I 2 Mubarak Mohammed Zainab Yunis Yookal 4 5 CITY CITYID CITYNAME Gender ECITY Bal 600 IZKI NIZWA ALSOUQ BAHLA Refer the Student table given below. Write a PL/SQL block to select and display the names of all students who scored more than the average mark of all the students of their college. [3 marks] MANAH MARFAA Program 2 Suppose you have the following EMPLOYEES, CITY and EMPSAL tables. [7 marks] EMPLOYEES EID Ename 55 Ad M 56 Ibrahim M 57 Ali M 58 Mohammed M 59 Imacel M 60 Amal F 6 1 Mar k 78 39 67 90 95 2 300 3 150 3 900 4 100 76 86 100 Department ID 1 2 EMPSAL EID BSal Basic Allow GrossSal RetDedec 2 3 3 1 1 Suppose you have the following EMPLOYEES, CITY and EMPSAL tables. [7 marks] EMPLOYEES EID Fams 55 Asad 36 B 57 All 58 Mohmed M 59 M 60 Amal F CITY CITYID EGender ECTTV Beal 400 M M M CITYNAME IZKI NIZWA ALSOUQ BAHLA MANAH MARFAA 3 350 300 150 900 100 EMPSAL EID Bal Badt Allew Graal Retud Write a PL/SQL code to calculate Basic allowance, Gross Salary and Retirement deduction for each employee in the EMPLOYEE table. a)Apply the following criteria to calculate the Basic allowance (Basic Allow). (Basic Salary(BSal( Basic allowance (Basic Allow Isal 200 BSal <400 2200 Sal 2400 of BiSal 7% 10% of Bal 15% of Bal »Calculate the Gross salary (GrossSal) using the formula:- Gross salary Basic salary + Basic allowance Calculate the Retirement Deduction (RetDeduc) using the formula:- Retirement Deduction -2% of Gross salary Insert the necessary values as a new record into the EMPSAL table for each employee. Finally, display the following details for each employee. Sample Output EMBED 55 55 56 57 58 59 40 Salary 841lowance Gsalary Deduction City 30 13.8 MARF 10 13.8 MARFAR 7.7 IZKI 6.6 NIZA 160.5 3.21 1035 20.7 107 400 GOD 350 300 150 900 100 35 30 10.5 135 630 6:30 385 330 AL SOUD ALSOUG 2.14 BAILA I Objectives This problem set will introduce you to the Oracle Application express environment for PL/SQL programming. In this problem set you will write programs that uses composite record variable, user-defined variables, conditional structure and loops in PL/SQL. Program 1 Students Student ID Student Name 1 4 5 6 7 8 3 Amia Anwar Man I 2 Mubarak Mohammed Zainab Yunis Yookal 4 5 CITY CITYID CITYNAME Gender ECITY Bal 600 IZKI NIZWA ALSOUQ BAHLA Refer the Student table given below. Write a PL/SQL block to select and display the names of all students who scored more than the average mark of all the students of their college. [3 marks] MANAH MARFAA Program 2 Suppose you have the following EMPLOYEES, CITY and EMPSAL tables. [7 marks] EMPLOYEES EID Ename 55 Ad M 56 Ibrahim M 57 Ali M 58 Mohammed M 59 Imacel M 60 Amal F 6 1 Mar k 78 39 67 90 95 2 300 3 150 3 900 4 100 76 86 100 Department ID 1 2 EMPSAL EID BSal Basic Allow GrossSal RetDedec 2 3 3 1 1
Expert Answer:
Answer rating: 100% (QA)
The required PLSQL query will be DECLARE vstudentname StudentsStudent Na... View the full answer
Related Book For
Corporate Finance A Focused Approach
ISBN: 978-1439078082
4th Edition
Authors: Michael C. Ehrhardt , Eugene F. Brigham
Posted Date:
Students also viewed these accounting questions
-
Suppose you have the following historical returns for the stock market and for another company, P.Q. Unlimited. Explain how to calculate beta, and use the historical stock returns to calculate the...
-
Suppose you have the following hypothetical demand or sales function. Qx = -4Px + 2Py + 0.20I + 0.04A And PX = $200, (price of good X) PY = $230,(price of good Y) I = $15,000 (disposable per capita...
-
Suppose you have the following information: Demand rate (D) = 750 units per hour Lead time (T) = 40 hours Container capacity (C) = 1,000 units Safety factor (x) = 10% How many kanban production cards...
-
Which 3 accounts can't be merged in the chart of accounts?
-
It is desired to control the angular displacement ( of a space vehicle by controlling the applied torque T supplied by thrusters (Figure PI2.3). The plant model is Gp (s) = ( (s) / T (s) = 5/s2...
-
Review key concepts in this chapter and discuss what, in your opinion, links the situation analysis to the other steps of health communication planning.
-
A laminar boundary layer velocity profile is approximated by \(u / U=2(y / \delta)-2(y / \delta)^{3}+(y / \delta)^{4}\) for \(y \leq \delta\), and \(u=U\) for \(y>\delta\). (a) Show that this profile...
-
1. Compute the net investment required to establish the collection subsidiary. 2. Compute the annual net cash flows over the 10-year life of the project. 3. Compute the net present value of this...
-
Emily is traveling in Germany. Her rental car measures speed in km/h, but the road signs display speeds in mph. The speed limit on the autobahn is 130 km/h. What is this speed limit in mph? Give your...
-
The Country Pie is a highly recognized baker of quality pies in Beamsville, Ontario. The current proprietor, Rudolph Strudel, started the business about 20 years ago with an initial purchase of...
-
A) How does Islamic banking differ from conventional banking?
-
Make sure to read all directions. Must show all work for credit. Test is due on Monday August 1st at 12:30 pm. If late you will be deducted 20%. The metabolic disorder diabetes causes a buildup of...
-
If you ever need help within the program, click on the Question Mark button in the lower left edge (or press the F1 key), to open the Help window. This window gives you a list of shortcuts that will...
-
What financial information in this document can be used in the letter to board of directors about investment to R&D for growth and innovation?
-
Calculate of the relevant profitably, liquidity, asset usage and investment ratios (ROS, ROA, RE, ROE, assets turnover, inventories turnover, account receivables turnover, account payable turnover,...
-
BF1 BF 2 BF 3 BF4 SQL Query SELECT O.pid, O.orderDate FROM Department D JOIN Order O ON (D.did=O.did) WHERE D.dName = 'Database Management' AND O.orderDate> '2021-08-19; SELECT O.did FROM Supplier S...
-
The Ashton Manufacturing Company operates under a job-order costing system. The data from the past month's activities is summarized as follows: Starting balance in Work in Process: $36,000 Raw...
-
Discuss the concept of the looking-glass self. how do you think others perceive you? do you think most people perceive you correctly?
-
Finally, assume that the new product line is expected to decrease sales of the firms other lines by $50,000 per year. Should this be considered in the analysis? If so, how?
-
A bond that pays interest forever and has no maturity date is a perpetual bond, also called a perpetuity or a consol. In what respect is a perpetual bond similar to (1) a nogrowth common stock and...
-
Would the franchises IRRs change if the cost of capital changed?
-
Show all the steps leading to the integral balance equation (18.6) in the text. Use the following boundary conditions and verify Eq. (18.7). (i) At \(y=0, T=T_{\mathrm{S}}\). (ii) At...
-
Consider the flat-plate heat transfer to be solved by the similarity approach. Show all the details leading to Eq. (18.15). What are the boundary conditions on \(\theta\) ? Extend your MATLAB code to...
-
For fluids with \(\operatorname{Pr} <1\) the velocity profile is assumed to be a cubic for \(y
Study smarter with the SolutionInn App