select posts.id as [Post Link] , case when posts.PostType...

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

select
    posts.id as [Post Link]
  , case when posts.PostTypeId = 1 then 'Q' else 'A' end as Type
  , posts.score
  , coalesce(posts.ViewCount, question.ViewCount)
  , cast(coalesce(posts.ViewCount, question.ViewCount) as float) / posts.Score as ratio
from Posts
left outer join Posts question on Posts.ParentId = question.id
where -- posts.id in (55910468, 55729879)
    posts.score >= 5
and posts.CreationDate > Convert(datetime, '2019-04-20')
and posts.OwnerUserId > 11330000
and coalesce(posts.ViewCount, question.ViewCount) < 500
and cast(coalesce(posts.ViewCount, question.ViewCount) as float) / posts.Score < 12
order by 5 asc

Enter Parameters

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