SELECT COUNT(U.Id) AS UserCount, COUNT(P.Id) AS PostUserC...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Robotics

Q&A for professional robotic engineers, hobbyists, researchers and students

SELECT 
    COUNT(U.Id) AS UserCount,
    COUNT(P.Id) AS PostUserCount,
    ROUND(100.0 * COUNT(U.Id) / (SELECT COUNT(*) FROM Users), 2) AS PercentageNoPosts
FROM Users U
LEFT JOIN Posts P ON U.Id = P.OwnerUserId
WHERE P.OwnerUserId IS NULL;

Enter Parameters

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