• + 0 comments

    SELECT concat(Name, '(',left(Occupation,1),')') FROM OCCUPATIONS ORDER BY Name;

    with occ_count as ( SELECT Occupation, count() as occr FROM OCCUPATIONS group by Occupation order by count(), Occupation )

    select concat("There are a total of ", occr," ", lower(Occupation),"s." ) from occ_count;