select qcomplex.userId as userId, avg(qcomplex.complexity...


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for scholars and enthusiasts of literature

select qcomplex.userId as userId, avg(qcomplex.complexitysum) as complexitysum, avg(qcomplex.complexity) as complexity, avg(qcomplex.varcomplexity) as varcomplexity,
avg(qcomplex.tagcount) as tagcount, datediff(month,cast('2015-03-01' as datetime), qcomplex.qdate) as month


(select max(qlist.uid) as userId,  avg(tagcomplexity.complexity) as complexitysum, count(pt.TagId) / sum(tagcomplexity.complexity) as complexity, var(tagcomplexity.complexity) as varcomplexity, count(pt.TagId) as tagcount, max(qlist.qdate) as qdate

from PostTags pt,

(select distinct t.Id as tid, sum( posttagm1.tagc)as countallJ, min(t.Count) as countI, sum(posttagm1.tagc)/cast(min(t.Count) as numeric) as complexity
from Tags t, PostTags pt,

(select distinct pt.PostId as pid, cast((count(pt.TagId)-1) as numeric )  as tagc
from PostTags pt
group by pt.PostId) posttagm1 

where t.Id=pt.TagId and and t.Count > 1
group by t.Id
) tagcomplexity,

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

from Posts p, PostTags pt,

(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=100570 or pt.TagId=40102 or pt.TagId=109466 or pt.TagId=116033 or pt.TagId=113994 or pt.TagId=24100 or pt.TagId=99347 or pt.TagId=132868) 
and p.PostTypeid=1
and p.CreationDate>=cast('2015-03-01' as datetime) 
and p.CreationDate<=cast('2017-03-31' as datetime) 
group by p.OwnerUserId
) userlist

where userlist.uid=p.OwnerUserId and p.CreationDate>=cast('2015-03-01' as datetime) and p.CreationDate<=cast('2017-03-31' as datetime) and p.PostTypeId=1
and p.Id=pt.PostId and (pt.TagId=4190 or pt.TagId=67719 or pt.TagId=81490 or pt.TagId=20400 or pt.TagId=82977 or pt.TagId=5990) 
) qlist

where tagcomplexity.tid=pt.TagId and
group by
) qcomplex

group by qcomplex.userId, datediff(month,cast('2015-03-01' as datetime), qcomplex.qdate)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results