declare @UserId int = ##UserId## declare @voteCount int ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

-- Enter Query Title
-- Enter Query Description

declare @UserId int = ##UserId##
declare @voteCount int

select @voteCount = u.UpVotes + u.DownVotes
from Users u
where u.Id = @UserId


select case
    when @voteCount < 600 then 150 / 30
    else @voteCount / (4 * 30)
end

Enter Parameters

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