Testing

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

--declare @x INT = 2018 
SELECT datepart(year,question.creationdate) Years, 
DATEDIFF(day, question.creationdate, asnswer.creationdate) ResponseInDays
--count(*) HowManyQuestion 
FROM posts question 
inner join posts asnswer 
on question.AcceptedAnswerId = asnswer.id
where datepart(year,question.creationdate) <= 2018
--and DATEDIFF(day, question.creationdate, asnswer.creationdate) >= 0
group by datepart(year,question.creationdate),
DATEDIFF(day, question.creationdate, asnswer.creationdate)
order by datepart(year,question.creationdate),
DATEDIFF(day, question.creationdate, asnswer.creationdate)
desc

--order by DATEDIFF(day, question.creationdate, asnswer.creationdate) desc




--datepart(year,creationdate) = @x

Enter Parameters

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