DECLARE @hindex INT SET @hindex = 0 WHILE (SELECT COUNT...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Enter Query Title
-- Enter Query Description

DECLARE @hindex INT 
SET @hindex = 0

WHILE (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = 98117 AND Score >= @hindex) > @hindex
BEGIN
    set @hindex = @hindex + 1
END

SELECT @hindex

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results