Edit 3

0

Please login or register to vote for this query.

(click on this box to dismiss)

Webmasters

Q&A for pro webmasters

with questionindec2020 as(
select p.Id ,
cast(p.creationdate as date) as creationdate,
p.AcceptedAnswerId
from posts p
inner join posttypes pt
on p.posttypeid = pt.id 
where pt.Name = 'Question'
and (creationdate between '2020-12-01' and '2020-12-31')),

acceptedanswers as
(  
  select q.Id as QuestionId,q.creationdate,
  a.Id as AcceptedAnswerId,
  a.score as AcceptedAnswerScore
  from questionindec2020 q
  inner join posts a
  on q.AcceptedAnswerId = a.Id
  where a.score>=10
  
) ,

highestanswerscores as(
select a.QuestionId,max(p.score) as HighestAnswerScore
from acceptedanswers a
inner join posts p
on p.ParentId = a.QuestionId
where p.score>a.AcceptedAnswerScore
group by a.QuestionId)

select a.QuestionId,a.QuestionId as [Post Link],a.creationdate,HighestAnswerScore,AcceptedAnswerScore
from acceptedanswers a inner join highestanswerscores h
      on a.QuestionId = h.QuestionId

Enter Parameters

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