Get unclosed questions with closed votes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Japanese Language

Q&A for students, teachers, and linguists wanting to discuss the finer points of the Japanese language

select top 10 'http://stackoverflow.com/q/'+cast(posts.id as varchar),
       posts.id, /*count(*) c,*/ votes.*, posthistory.creationdate, posts.viewcount
from votes
join posts on votes.postid = posts.id
left join posthistory on posthistory.postid = posts.id
  and posthistory.posthistorytypeid = 11 -- reopen
where votetypeid = 6 -- close vote
  and closeddate is null
  --and (posthistory.id is null or votes.creationdate > posthistory.creationdate)
  --and posthistory.id is not null
  --and (posts.viewcount < 100 or votes.creationdate > dateadd(day, -10, getdate()))
  and posts.id = 7980571
--group by posts.id
--having count(*) >= 1

--order by c desc, postid asc

Enter Parameters

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