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

Create a procedure that will take a sales id as a parameter. It will then use th

ID: 3854436 • Letter: C

Question

Create a procedure that will take a sales id as a parameter. It will then use this sales id to get the total from the receipts. After it has the receipt totals it will then pass the total through the procedure we created in class to get a new total based off zipcode. For now assume all zip codes are '13676'. After it has this new tax + receipt total. Update the sales table setting the total equal to this new total you created. Sudo code example listed below. You will need to use more variables than what is listed below. Remember the scope of variables. This is just to give you an overall idea of what it needs to do. Start procedure UpdateSalesTotal(sales_id) receipt_total = total from the receipts could have multiple receipt ids based off sales_id CALL totalWithTax(receipt_total, 13676) Update SQL to set sales' table total = new total received from totalWithTax procedure. End procedure UpdateSalesTotal Test UpdatedSalesTotal(sales_id)/*can use any sales id to test.*/Create SQL to select employee id, first name, last name, book title, and quantity of each book they sold.

Explanation / Answer

2) select emplid,first_name,last_name,title,Total Count Sold from sales

1)

receipt_total=select * from receipts oreder by sales_id;

a=totalwithtax(receipt_total,13676)

update_query=update sales set sales_total=a order by sales_id

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