( mcnab | 2021. 01. 26., k – 14:34 )

SELECT
   client_id, 
   SUM(DECODE(status, 0, 1, 0)) count_0,
   SUM(DECODE(status, 10, 1, 0)) count_10,
   SUM(DECODE(status, 20, 1, 0)) count_20,
   SUM(DECODE(status, 30, 1, 0)) count_30,
   SUM(DECODE(status, 40, 1, 0)) count_40,
   SUM(DECODE(status, 50, 1, 0)) count_50
FROM cli_s
GROUP BY client_id
ORDER BY client_id

Ez valószínűleg minden ANSI SQL-en működni fog. 

SELECT * 
FROM (
   SELECT client_id, status
   FROM cli_s)
PIVOT (
   COUNT(*) FOR status IN (0 AS count_0, 10 AS count_10, 20 AS count_20, 30 AS count_30, 40 AS count_40, 50 AS count_50)
)

Ez pedig ugyan az errefelé közutálatnak örvendő cég által gyártott rdbms-ben (11g-től).