Q&A about the site for professional and enthusiast programmers
;with Data as ( select p.Id, case when p.Tags like '%status-completed%' then 'Completed' else 'Not Completed' end [Status] from Posts p where p.PostTypeId = 1 and p.Tags like '%burninate-request%' ) select d.Status, count(d.Id) [Post Count], (count(d.Id) * 1.0) / (select count(1) from Data) * 100 [Percent] from Data d group by d.Status