User Answers over time

0

Please login or register to vote for this query.

(click on this box to dismiss)

Programming Language Design and Implementation Meta

Q&A for designers and implementers of computer programming languages

DECLARE @UserId int = ##UserId##;
DECLARE @MinDate datetime = ##MinDate:string##;
DECLARE @MaxDate datetime = ##MaxDate:string##;

SELECT 
  COUNT(DISTINCT Answers.Id) AS Answers,
  COUNT(DISTINCT Votes.BountyAmount) AS Votes
FROM 
  Posts AS Answers
  INNER JOIN Votes ON (Answers.Id = Votes.PostId)
WHERE 
  Answers.OwnerUserId = @UserId AND 
  Answers.CreationDate >= @MinDate AND
  Answers.CreationDate <= @MaxDate AND
  Answers.PostTypeId = 2;

Enter Parameters

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