so case when type is IR then SUM quantity - case w...
# general
s
so case when type is IR then SUM quantity - case when type is PO then SUm quantity