Query1:Select posts (Id) that have greater CommentCount than FavoriteCount with their corresponding

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles

Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles

--Select Id, DisplayName and their total AnswerCount,
--for users with more than 2500 total AnswerCount

with cte1 as (
select 
u.id, 
u.DisplayName ,
sum(AnswerCount) total

from users u
join Posts p
on u.id=p.OwnerUserId
group by u.id, 
u.DisplayName
)
select id,DisplayName,total 
from 
cte1 where total>2500
;

Enter Parameters

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