• + 3 comments

    Good problem, requires a little bit of carefulness :)

    For MySQL:


    select concat(name, '(', substr(occupation, 1, 1), ')') from occupations order by name asc;

    select concat('There are total ', count(), ' ', lower(occupation), 's', '.') as report from occupations group by occupation order by count();