select p.OwnerUserId, min(cast(t.Count as numeric)) as mi...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

select p.OwnerUserId, min(cast(t.Count as numeric)) as min_tag_fix, max(cast(t.Count as numeric)) as max_tag_fix, avg(cast(t.Count as numeric)) as avg_tag_fix, sum(t.Count ) as sum_tag_fix, avg( 1 / cast(t.Count as numeric) ) as avg_rarity_fix ,
sum( 1 / cast(t.Count as numeric) ) as sum_rarity_fix 
from Tags t, PostTags pt, Posts p,

(select p.Id as pid, userlist.uid as uid, p.CreationDate as qdate

from PostsWithDeleted p,

(select p.OwnerUserId as uid 
from Posts p,  PostTags pt, Users u
where p.OwnerUserId=u.Id and p.Id=pt.PostId
and (pt.TagId=77858)
and p.PostTypeid=1
and p.CreationDate>=cast('2012-07-01' as datetime) 
and p.CreationDate<=cast('2015-03-01' as datetime) 
group by p.OwnerUserId
) userlist
  

where userlist.uid=p.OwnerUserId and p.CreationDate>=cast('2012-07-01' as datetime) and p.CreationDate<=cast('2015-03-01' as datetime) and p.PostTypeId=1
) qlist

where pt.PostId = qlist.pid and  pt.TagId = t.Id and qlist.pid = p.Id and t.Count>=1
 
group by p.OwnerUserId

Enter Parameters

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