条件付き集計を使用するだけです:
SELECT SUM(CASE WHEN STATUS = 'A' THEN 1 ELSE 0 END) AS A_COUNT ,
SUM(CASE WHEN STATUS = 'B' THEN 1 ELSE 0 END) AS B_COUNT ,
SUM(CASE WHEN STATUS = 'C' THEN 1 ELSE 0 END) AS C_COUNT ,
SUM(CASE WHEN STATUS = 'D' THEN 1 ELSE 0 END) AS D_COUNT ,
SUM(CASE WHEN STATUS = 'E' THEN 1 ELSE 0 END) AS E_COUNT ,
SUM(CASE WHEN STATUS = 'F' THEN 1 ELSE 0 END) AS F_COUNT
FROM XYZ ;
値を別々の行に配置する方がさらに簡単であることを指摘しておく必要があります:
select status, count(*)
from xyz
group by status;