select a01, count(*) as quanti from TB group by a01

similmente per le altre colonne