SELECT
role,
count(*) AS quantity,
'1' AS bn
FROM employees
WHERE building IS NOT NULL
GROUP BY role
UNION
SELECT
role,
count(*) AS quantity,
'0' AS bn
FROM employees
WHERE building IS NULL
GROUP BY role
终于做出来了(┬_┬)