Create a PI/SQL function named AVG_SAL that will return the average salary from the employees table....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a PI/SQL function named AVG_SAL that will return the average salary from the employees table. You must develop your own average function. You cannot use the inbuilt min function. Use cursor to fetch the records from employee table. Create a PI/SQL function named Check LName, that will check whether the name is present in the last name column of employees table. You cannot use select operation to check whether name is present or not. You cannot use the inbuilt function. You must use explicit cursor. Create a PI/SQL procedure named CALC_TAX, which will calculate the annual tax to be paid by an employee based on his salary. You have to pass two parameters one is to supply input to procedure, and one is to get output from the procedure. Input should be the EMPLOYEE_ID AND OUTPUT WILL BE ANNUAL TAX OF THE EMPLOYEE. TAX=((SALARY*12)-10000)*.09 Create a PI/SQL function named AVG_SAL that will return the average salary from the employees table. You must develop your own average function. You cannot use the inbuilt min function. Use cursor to fetch the records from employee table. Create a PI/SQL function named Check LName, that will check whether the name is present in the last name column of employees table. You cannot use select operation to check whether name is present or not. You cannot use the inbuilt function. You must use explicit cursor. Create a PI/SQL procedure named CALC_TAX, which will calculate the annual tax to be paid by an employee based on his salary. You have to pass two parameters one is to supply input to procedure, and one is to get output from the procedure. Input should be the EMPLOYEE_ID AND OUTPUT WILL BE ANNUAL TAX OF THE EMPLOYEE. TAX=((SALARY*12)-10000)*.09
Expert Answer:
Answer rating: 100% (QA)
This is how I would answer the three part question The first question was to create a PLSQL function named AVGSAL that will return the average salary ... 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
-
Describe the strategic implications of self-driving cars or robotics on traditional companies.
-
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...
-
For the conceptual schemata of the database, establish an environment for the execution of simple and advanced queries in Oracle. The global schemata is as below EMP (ENUM, NAME, SAL, TAX, MGR, DNUM)...
-
Onefifth of a hive of bees flew to the Kadamba flower; one-third flew to the Silandhara; three times the difference of these two numbers flew to an arbor, and one bee continued flying about,...
-
Find the ABCD parameters for the circuit shown. 1
-
Find or describe three TV commercials you remember seeing recently. Are these examples of brand communications? Explain why or why not.
-
Two different fluids flow over two identical flat plates with the same laminar free-stream velocity. Both fluids have the same viscosity, but one is twice as dense as the other. What is the...
-
Easy Pages Packn Mail completed the following transactions during 2014: Nov.1 Paid $ 6,000 store rent covering the three-month period ending January 31, 2015. Nov.1 Paid $ 6,000 insurance covering...
-
Question One You must answer all parts of this question Jane runs a meeting group for parents with babies and toddlers, the "Group for Babies and Toddlers" (GBT) in the town of Glead, Ireland. She...
-
Jackson et al. (1987) compared the precision of systematic and stratified sampling for estimating the average concentration of lead and copper in the soil. The 1-km2 area was divided into 100-m...
-
A 5.0-kg rabbit and a 12-kg Irish setter have the same kinetic energy. If the setter is running at speed 4.9 m/s, how fast is the rabbit running? Express your answer with the appropriate units. 89 m...
-
Suppose a bullet travels with uniform motion a distance of 2 m in 0.005 second. If we divide the displacement by the time interval, we get 400 m/s. How do you interpret the number 400 in light of the...
-
At the workplace, one of the means to effect intra- and inter-departmental communication is the use of a MEMO. http://work.chron.com/write-memo-ones-boss-7217.html Question (a) What is a memo?...
-
1. Write a Java program to do the following set of actions: a. Get the size of an array from the user and store it to a variable 'n'. b. Get the elements of the array of size 'n' from the user. c....
-
(a) If $20,000 is now borrowed from a bank and repay by monthly payment for two years. The bank charges a flat rate of 0.5% per month. Calculate the amount of interest for this loan. [4 marks] (b)...
-
Aside from the 50,000 monthly rental for leased premises, X paid ABC Corporation (lessor) 5,000 representing the agreed share of X in the payment of the real property tax on the leased property. How...
-
Which has the equal boiling point ? (a) 0.1 M NaSO4 (c) 0.1 M MgCl (b) 0.1 M C6H12O6 (glucose) (d) 0.1 MAI (NO3)3
-
According to a recent survey, 40% of millennials (those born in the 1980s or 1990s) view themselves more as spenders than savers. The survey also reveals that 75% of millennials view social...
-
What is management accounting?
-
Waste, rework, and net cost of scrap are examples of what kinds of quality costs?
-
Pierre LeBlanc, manager of Centaur Corporation, is thinking about implementing a target costing system in his organization. Several managers have taken him aside and have expressed concerns about...
-
In Fig. 1130, there is no explicit invariant that states that a Transaction cannot be linked to movements that are linked to the same account, because the structure of the model already demands is....
-
Apply the Account/Transaction pattern to the parallel financial transactions of the example shown in Figs. 1131 to 1135. As the bills may be paid forward, it may be necessary to use memo entries....
-
Look at Fig. 1119 and create a new discount strategy that gives a percentage of discount for sales with more than a certain number of products. Order | < > < > +nr: Natural = < > +date: Date...
Study smarter with the SolutionInn App