select top 3 c.postid, count(1) from comments c inner joi...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sustainable Living

Q&A for folks dedicated to a lifestyle that can be maintained indefinitely without depleting available resources

select top 3 c.postid, count(1)
from comments c
inner join (
	select postid, max(creationdate) as cr_date from comments
	group by postid
	) c_max
on c.postid=c_max.postid and c.creationdate=c_max.cr_date
group by c.postid
having count(1) > 1

Enter Parameters

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