Hi,
select count(*) from table1 where inventoryid = 21 -- 132
select count([expired]) from table1 where inventoryid = 21 and [expired] = 1 -- 57
select count([Consigmment]) from table1 where inventoryid = 21 and [expired] = 1 -- 54
· I need the results as in below screenshot - with a single query
InventoryId | Counts | Expired | Consigmnet |
21 | 132 | 57 | 54 |
| | | |
Regards,
hari