PostTypes_all

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском

Q&A for программистов

--select OwnerDisplayName from Posts where OwnerUserId is null group by OwnerDisplayName

--select * from Users order by Reputation asc

--select Id, PostTypeId, AcceptedAnswerId, ParentId, CreationDate, Score, ViewCount, OwnerUserId, OwnerDisplayName, LastEditorUserId
--, LastEditorDisplayName, LastEditDate, LastActivityDate, Title, Tags, AnswerCount, CommentCount,FavoriteCount, ClosedDate, CommunityOwnedDate 
--from Posts 
--where PostTypeId=2 order by Score asc

--select * from Users u where 
--u.Id in (select OwnerUserId from Posts where OwnerUserId is not null and PostTypeId=1) 
--and
--u.Id in (select OwnerUserId from Posts where OwnerUserId is not null and PostTypeId=2) 

select p.OwnerUserId, count(*) as posts_counter from Posts p where 
exists   
(select u.Id from Users u where 
u.Id in (select OwnerUserId from Posts where OwnerUserId is not null and PostTypeId=1) 
and
u.Id in (select OwnerUserId from Posts where OwnerUserId is not null and PostTypeId=2) 
and u.Id=p.OwnerUserId
) 
group by p.OwnerUserId

Enter Parameters

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