Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create an oracle sql procedure for federal income tax the user salary (user_sala

ID: 3571924 • Letter: C

Question

Create an oracle sql procedure

for federal income tax

the user salary (user_salary) calculates the total income after taxes

conditions

$0 to $9,225 10% $9,226 to $37,450 $922.50 plus 15% of the amount over $9,225 $37,451 to $90,750 $5,156.25 plus 25% of the amount over $37,450 $90,751 to $189,300 $18,481.25 plus 28% of the amount over $90,750 $189,301 to $411,500 $46,075.25 plus 33% of the amount over $189,300 $411,501 to $413,200 $119,401.25 plus 35% of the amount over $411,500 $413,201 or more $119,996.25 plus 39.6% of the amount over $413,200

Explanation / Answer

CREATE PROCEDURE CALCULATE_SALARY (
RAW_SALARY IN NUMBER,
USER_SALARY OUT NUMBER
)
AS
BEGIN
IF RAW_SALARY <= 9225 THEN
USER_SALARY := (RAW_SALARY * 10)/100;
ELSIF RAW_SALARY BETWEEN 9226 AND 37450 THEN
USER_SALARY := 922.5 + (((RAW_SALARY - 9225) * 15) / 100);
   ELSIF RAW_SALARY BETWEEN 37451 AND 90750 THEN
USER_SALARY := 5156.25 + (((RAW_SALARY - 37450) * 25) / 100)
   ELSIF RAW_SALARY BETWEEN 90751 AND 189300 THEN
USER_SALARY := 18481.25 + (((RAW_SALARY - 90750) * 28) / 100)
   ELSIF RAW_SALARY BETWEEN 189301 AND 411500 THEN
USER_SALARY := 46075.25 + (((RAW_SALARY - 189300) * 33) / 100)
   ELSIF RAW_SALARY BETWEEN 411501 AND 413200 THEN
USER_SALARY := 119401.25 + (((RAW_SALARY - 411500) * 35) / 100)
   ELSIF RAW_SALARY >= 413201 THEN
USER_SALARY := 119996.25 + (((RAW_SALARY - 413200) * 39.6) / 100)
   END IF
END;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote