Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Ranking For each group

$
0
0
Hi All,
I have the following table:
declare @T table
(
ID int identity
, NUM int
);
insert into @T values
(0),(0),(0),(1),(1),(0),(0),(0),(1),(1),(0),(0),(0);

ID NUM
1 0
2 0
3 0
4 1
5 1
6 0<

Viewing all articles
Browse latest Browse all 3145

Trending Articles