WITH t1 AS( SELECT * FROM Posts WHERE OwnerUserId IS NOT ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

WITH t1 AS(
  SELECT *
  FROM Posts
  WHERE OwnerUserId IS NOT NULL
  )  
  SELECT SUM(CASE WHEN t1.OwnerUserId IS NULL THEN 0 ELSE 1 END) AS count_nulls
FROM Users u
LEFT JOIN t1
    ON u.Id = t1.OwnerUserId;

Enter Parameters

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