TF team posts type distribution

0

Please login or register to vote for this query.

(click on this box to dismiss)

Philosophy Meta

Q&A about the site for those interested in the study of the fundamental nature of knowledge, reality, and existence

--TF' upvotes
--A bit more unbiased insight than reputation

Create Table #postInfo (
  [PostId] int  null,
  [postOwnerUserId] int  null,
  [postTypeId] int  null,
  [postScore] int null,
  [postViewCount] int null,
  [postAnswerCount] int null,
  [postCommentCount] int null,
  [postFavoriteCount] int null,

  
  
)

Insert Into #postInfo

select Posts.Id as [PostId],
Posts.OwnerUserId as [postOwnerUserId],
Posts.postTypeId as [postTypeId],
Posts.Score as [postScore],
Posts.ViewCount as [postViewCount],
Posts.AnswerCount as [postAnswerCount],
Posts.CommentCount as [postCommentCount],
Posts.FavoriteCount as [postFavoriteCount]

from Posts
-- inner join Users on Users.Id=Posts.OwnerUserId
where 
      (posts.Tags LIKE '%tensorflow%') 
    --posts.OwnerUserId = 11530462
--group by 
order by postScore desc

-----------------

select count(postId) as postCount, 
       count(distinct(postOwnerUserId)) as userCount, 
       sum(postScore) as totalscore, 
       sum(postViewCount) as totalViewCount, 
       sum(postAnswerCount) as totalAnsCount, 
       sum(postFavoriteCount) as totalFavouriteCount, 
       sum(postCommentCount) as totalPostComment,
       
       CASE
       WHEN postTypeId = 1 THEN count(postTypeId) 
       END as questionCount

from  #postInfo
group by postTypeId

Enter Parameters

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