-
-
Save Glorfindel83/91b9346b33ec89f2ec0544cba8069e06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select top 20 p.id as [Post Link], p.score, p.viewcount, p.answercount, p.tags, | |
u.reputation, u.id as [User Link] | |
from posts p | |
inner join users u on p.owneruserid = u.id | |
inner join posts x on x.owneruserid = u.id | |
where u.reputation >= 1000 | |
and p.tags like '%python%' | |
group by p.id, p.score, p.viewcount, p.answercount, p.tags, p.creationdate, u.reputation, u.id | |
having sum(case when x.posttypeid = 1 then 1 else 0 end) | |
< sum(case when x.posttypeid = 2 then 1 else 0 end) | |
order by p.creationdate desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment