with tagged as ( select dateadd(week, datediff(week, '202...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

with tagged as
(
  select dateadd(week, datediff(week, '2020-01-05', p.CreationDate), '2020-01-05') wk, TagName
  from Posts p 
  join PostTags pt on pt.PostId=p.Id
  join Tags t on t.Id=pt.TagId
  where p.CreationDate > '2020-01-01'
  and p.CreationDate < dateadd(week, datediff(week, '2020-01-05', getdate()), '2020-01-05')
  and ( p.Tags like '%<postgresql%'
    or p.Tags like '%<psql>%'
    or p.Tags like '%<postgis>%'
    or p.Tags like '%<plpgsql>%'
    or p.Tags like '%<enterprisedb>%'
    )
  and TagName not like 'postgresql%'
  and TagName not in ('psql', 'postgis', 'plpgsql', 'enterprisedb', 'sql', 'database')
)

select wk, TagName, count(*) Questions
from tagged
where TagName in (select top 10 TagName from tagged group by TagName order by count(*) desc)
group by wk, TagName
order by wk, count(*) desc

Enter Parameters

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