DECLARE @PageSize INT = 5
DECLARE @Order DECIMAL(10,2)
DECLARE @ID INT = 1113
SET @Order = ( SELECT OrderNo FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID Desc) AS OrderNo FROM SensitivityAnalysis Where UserId = 5 And IsState = 1 ) AS U WHERE U.Id = @Id )
SELECT CEILING(@Order/@PageSize) as PageNo