| CompanyName | OrderID | ProductID | DiscountPrice |
| ------------------------------------ | ---------------- | ---------------- | ---------------- |
| Alfreds Futterkiste | 10643 | 28 | 29.64 |
b. Create a stored procedure using cursor to calculate the discount
rate based on the original price.
| Original Range | Discount Rate |
| 10.00 - 19.99 | 5% |
| 20.00 - 49.99 | 10% |
| 50.00 - 99.99 | 15% |
| > 100.00 | 20% |
Print company name, product id, sale price, quantity, and total amount.
Hint: you can use a print function, check the print function in SQL book online
Sample output:
Company: Vins et alcools Chevalier
Product: 11 , Sale Price: $13.30 , Quantity: 12 , Total: 159.60
Solution to written part
Solution to programming part