SELECT SUM(M10000) M10000, SUM(M5000 - M10000 * 2) M5000, SUM(M1000 - M5000 * 5) M1000,
SUM(M500 - M1000 * 2) M500, SUM(M100 - M500 * 5) M100, SUM(M50 - M100 * 2) M50, SUM(M10 - M50 * 5) M10
FROM (SELECT NAME, COMM, TRUNC(COMM/10000) M10000, TRUNC(COMM/5000) M5000, TRUNC(COMM/1000) M1000,
TRUNC(COMM/500) M500, TRUNC(COMM/100) M100, TRUNC(COMM/50) M50, TRUNC(COMM/10) M10
FROM (SELECT 'A' NAME, 7530 COMM FROM DUAL UNION ALL
SELECT 'B', 10470 FROM DUAL UNION ALL
SELECT 'C', 46900 FROM DUAL UNION ALL
SELECT 'D', 84550 FROM DUAL) )