• + 0 comments

    select CASE when occupation='Doctor' then CONCAT(name,'(D)') when occupation='Professor' then CONCAT(name,'(P)') when occupation='Singer' then CONCAT(name,'(S)') else CONCAT(name,'(A)') end as occ_nam from OCCUPATIONS order by name asc;

    select CONCAT('There are a total of ',count(occupation),' ',LOWER(occupation),'s.') as ocurrences from OCCUPATIONS group by occupation order by count(occupation),occupation asc;