Q&A about the site for information security professionals
SELECT concat( 'site://tags/', t.tagname, '/info|', t.tagname, ' ', case when p.posttypeid = 4 then 'excerpt' else 'wiki' end ) [Tag Link], 'site://posts/' + CAST(p.Id AS varchar)+'/revisions' AS [Revisions], p.OwnerUserId AS [User Link], p.CreationDate, p.LastActivityDate, p.Score, p.ViewCount, p.Body FROM Posts p inner join tags t on (t.wikipostid = p.id or t.excerptpostid = p.id) WHERE (t.tagname Like '%##tagname?status%##%') AND (p.PostTypeId IN (##types?4,5##)) ORDER BY p.Id DESC