SELECT AM.m,
COUNT(JRC.id) FROM
(SELECT 1 AS m
UNION ALL SELECT 2
UNION ALL SELECT 3
UNION ALL SELECT 4
UNION ALL SELECT 5
UNION ALL SELECT 6
UNION ALL SELECT 7
UNION ALL SELECT 8
UNION ALL SELECT 9
UNION ALL SELECT 10
UNION ALL SELECT 11
UNION ALL SELECT 12
) AS AM
LEFT JOIN `candidates` AS `JRC`
ON AM.m = MONTH(JRC.created) AND (JRC.jr_id = 58)
GROUP BY AM.m
这将导致 12 个月的每月明智用户计数