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