group by:
select WhCode, BillType, SUM(currQuantity) Qty from bcStockRecord
group by WhCode, BillType
select WhCode, BillType, SUM(currQuantity) Qty from bcStockRecord
group by WhCode, BillType with rollup
select WhCode, BillType, SUM(currQuantity) Qty from bcStockRecord
group by WhCode, BillType with cube
select WhCode,GROUPING(WhCode), BillType,GROUPING(BillType), SUM(currQuantity) Qty from bcStockRecord
group by WhCode, BillType with cube