Question II10: Identifying data discrepancies given guidance
- Prompt: Orders can have the SubTotal calculated three ways:
A) From the SalesOrderHeader
B) Sum of OrderQty*UnitPrice
C) Sum of OrderQty*ListPrice
The calculation of C may often be higher than A or B because of discounts - call the ratio of A to C "Discount Rate". A and B, however, should always be the same.
Give me a table of every Sales Order where the discrepancy between A and B is greater than 0.01. In the result, include the Discount Rate, Sales Order ID, and all 3 versions of the Subtotal.
- Category:
- Datasets: Adventureworks
Latest Results