Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles
WITH a AS ( SELECT u.id AS user_id , COUNT(DISTINCT p.id) AS posts FROM Users u LEFT JOIN Posts p ON p.OwnerUserId = u.id AND p.PostTypeId = 2 AND (p.CreationDate>'2023-01-01') GROUP BY u.id ) , total AS ( SELECT COUNT(DISTINCT u.id) AS users FROM Users u ) SELECT COUNT(DISTINCT user_id) AS users , (SELECT users FROM total) AS total_users , CONVERT(decimal(4,2), COUNT(DISTINCT user_id) / (SELECT users FROM total) ) AS test , posts FROM a GROUP BY posts