I have a table with the following fields
Code Status Count
ABC 0 2
ABC 1 1
XYZ 0 0
XYZ 1 2
Thanks, Loonysan | http://mystutter.blogspot.com
CREATE TABLE state (Code NVARCHAR(10),Status int)
INSERT INTO State values ('ABC', 0) INSERT INTO State values ('ABC', 0) INSERT INTO State values ('ABC', 1) INSERT INTO State values ('XYZ', 1) INSERT INTO State values ('XYZ', 1)
Need a T-SQL query to return the following information
Code Status Count
ABC 0 2
ABC 1 1
XYZ 0 0
XYZ 1 2
Thanks, Loonysan | http://mystutter.blogspot.com