Cut resistance of a list

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

DECLARE @t table(a int,i int identity)

INSERT @t values(0),(0),(0),(1),(1),(0),(3),(3),(3),(2),(2)

DECLARE @ INT=1u:SET
@-=1DELETE x FROM(SELECT*,lag(a,1,-1)over(order by i)b
FROM @t)x
WHERE a<>b
IF @@rowcount>0GOTO u
PRINT-@

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results