Do you have a positive question record? (based on public information)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science Meta

Q&A about the site for scientists using computers to solve scientific problems

-- Minor revision! Just testing some stuff.

DECLARE @UserID int = ##UserID:int##, @CountedQs decimal

-- (total - negative - closed - deleted)/total >= 0.5
-- Can be implemented as  "questions NOT (negative, closed, deleted) / total"
-- Easier for a dumby like me to do

SELECT @CountedQs = count(*)
  FROM Posts
  WHERE PostTypeId = 1      -- It's a question
  AND OwnerUserID = @UserID -- Asked by the user
  AND Score >= 0            -- And positively scored
  AND ClosedDate IS NULL    -- And not closed
  -- As far as I can tell, there's no way to check for deleted questions
  --   so those can't count. Feel free to edit one in if there is.

SELECT @CountedQs / CAST(count(*) AS decimal)
  FROM Posts
  WHERE PostTypeId = 1      -- It's a question
  AND OwnerUserId = @UserID -- Asked by our user

Enter Parameters

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