ID Team Emp Status 1 PP H001 Active 2 AR H002 In-Active 3 BL H003 Active 4 EN H004 Active 5 PP H005 Active 6 AR H006 Active 7 BL H007 In-Active 8 EN H008 In-Active 9 PP H009 In-Active 10 AR H010 In-Active 11 BL H011 Active 12 EN H012 In-Active 13 PP H013 Active 14 AR H014 Active 15 BL H015 In-Active 16 EN H016 In-Active
Status PP AR BL EN Active 3 2 2 1 In-Active 1 2 2 3
SELECT Status, count(*) FROM [Tbl_Code] group by Status
SELECT status, [PP],[AR],[BL], [EN] FROM (SELECT status, team FROM tablename) as src PIVOT ( COUNT(team) FOR team IN ([PP],[AR],[BL], [EN]) ) AS output
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)