/*
Enter your query here.
*/
select
case when OCCUPATION = 'Doctor' then CONCAT(NAME, '(D)')
when OCCUPATION = 'Professor' then CONCAT(NAME, '(P)')
when OCCUPATION = 'Singer' then CONCAT(NAME, '(S)')
when OCCUPATION = 'Actor' then CONCAT(NAME, '(A)')
end as output
from OCCUPATIONS
UNION
select
CONCAT('There are a total of ', count(OCCUPATION), ' ', lower(OCCUPATION), 's.')
from OCCUPATIONS
group by OCCUPATION
order by 1
;