Q&A about the site for people interested in governments, policies, and political processes
declare @qc int declare @ac int select @qc = count(*), @ac = sum(case when AcceptedAnswerId is null then 0 else 1 end) from Posts q where PostTypeId = 1 select @qc as Questions, @ac as HasAcceptedAnswer, (@ac*100.0/@qc) as HasAcceptedAnswerPercentage