Devi COUNT()
con GROUP BY
in un SELECT
interno prima la clausola e poi applica GROUP_CONCAT()
;
SELECT GROUP_CONCAT(cnt) cnt
FROM (
SELECT COUNT(*) cnt
FROM table1
GROUP BY fk_company
) q;
Uscita:
| CNT | ----------- | 3,2,3,1 |
Ecco SQLFiddle demo.