Random singleton comments with zero score

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

with singleton as (select min(c.Id) Id
                   from comments c
                        join posts p on (PostId = p.Id)
                   group by PostId
                   having count(*) = 1
)

select top 100 s.Id as [Comment Link]
--len(text)/15, count(*)
from singleton s
join comments c on (s.Id = c.Id)
where score is null
--group by len(text)/15
order by newid()

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results