Question 4

0

Please login or register to vote for this query.

(click on this box to dismiss)

Earth Science

Q&A for those interested in the geology, meteorology, oceanography, and environmental sciences

with posts_no_comments as (
select
  count(a.Id) no_comment_total
from
  Posts a
left join
  Comments b on a.Id = PostId
where
  b.PostId is null
)
  
, total_posts as (
select
  count(a.Id) total_posts
from
  Posts a
)  

SELECT
  no_comment_total,
  total_posts,
  (no_comment_total * 100.0 / total_posts) AS no_comment_percentage
FROM
  posts_no_comments
CROSS JOIN
  total_posts

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results