Q&A about the site for administrators, end users, developers and designers for Craft CMS
WITH temp_table AS( SELECT * FROM Posts WHERE OwnerUserId IS NOT NULL ) SELECT COUNT(u.Id) FROM Users u LEFT JOIN temp_table t ON u.Id = t.OwnerUserId WHERE t.OwnerUserId IS NULL;