Q&A for professional and amateur woodworkers
with ytquestions_ as ( select count(*) ytquestions from ( select a.parentid from posts a inner join posts q on a.parentid = q.id where (a.body like '%youtube.com%' or a.body like '%youtu.be%') and q.deletiondate is null group by a.parentid ) x ), totalquestions_ as ( select count(*) totalquestions from posts where posttypeid = 1 and deletiondate is null ) select *, 1.0 * ytquestions / totalquestions pct from ytquestions_, totalquestions_