SELECT '25岁以下' AS age_cut, COUNT(*) AS number FROM user_profile WHERE age < 25 OR age IS NULL UNION ALL SELECT '25岁及以上' AS age_cut, COUNT(*) AS number FROM user_profile WHERE age >= 25 COUNT主要不要填age,因为NULL不被记入行数内。