Percent of questions that have [ltn] [one] tag

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

declare @numOfTags tinyint = ##tags:string?1##;

declare @type nvarchar(3) = ##strict:string?ltn##;

declare @totalPosted bigint = (
    select 
      count(Id) 
    from 
      Posts 
    where 
      PostTypeId = 1
  );

  --count(Id) as [ltn @numOfTags],
  --@totalPosted as Posted,
  --count(Id) * 100 / @totalPosted as [Percent],

select 
 Id, 
 count(TagId)
from
  Posts
  join PostTags on PostId = Id
where
  PostTypeId = 1
group by
  Id

 --case
   -- when @type = 'ltn' then count(TagId) <= @numOfTags
   -- when @type = 'gtn' then count(TagId) >= @numOfTags
 --end

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results