Instantly share code, notes, and snippets.

Embed
What would you like to do?
Asking some basic questions about the purchaseorderdetail table.
select *
from purchasing.purchaseorderdetail
limit 10;
-- Are there returns?
select *
from purchasing.purchaseorderdetail
where orderqty <= 0
limit 10;
-- Why does receivedqty + rejectedqty not always equal to orderqty?
select *
from purchasing.purchaseorderdetail
where (receivedqty + rejectedqty) != orderqty
limit 10;
-- perhaps they were rejected back to the manufacturer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment