The Pads HackerRank Advanced SQL Questions [Solved]

Stuck with Advanced Select problem in SQL?
https://www.hackerrank.com/challenges/the-pads/problem

NO WORRIES! HERE IS THE SOLUTION!

SELECT CONCAT(NAME,'(',SUBSTR(OCCUPATION,1,1),')') AS N
 FROM OCCUPATIONS
 ORDER BY N;
 SELECT CONCAT('There are a total of ',COUNT(OCCUPATION),' ',LOWER(OCCUPATION),'s.')
 FROM OCCUPATIONS
 GROUP BY OCCUPATION
 ORDER BY COUNT(OCCUPATION), OCCUPATION;

Read more...