declare @TaggedQuestions as int = (select count(distinct ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

declare @TaggedQuestions as int = (select count(distinct PostId) from PostTags);

select TagCount, count(*) Questions, count(*)*100.0/@TaggedQuestions PctAll
from 
(
  select count(*) TagCount
  from PostTags pt
  group by PostId
) t
group by TagCount
order by TagCount desc

Enter Parameters

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