Sort by

recency

|

5525 Discussions

|

  • + 0 comments

    SELECT CONCAT(O.Name,'(',LEFT(O.Occupation, 1),')') FROM OCCUPATIONS AS O ORDER BY O.NAME ASC;

    SELECT CONCAT ('There are a total of ', COUNT(*),' ',LOWER(O.Occupation),'s.') AS SUMMARY FROM OCCUPATIONS AS O GROUP BY O.Occupation ORDER BY SUMMARY ASC

  • + 0 comments

    select Name||'('|| substr(Occupation,1, 1) ||')' from OCCUPATIONS;

    select 'There are a total of ' || count(Occupation) ||' ' || lower(Occupation) || 's.' from OCCUPATIONS group by Occupation order by count(Occupation), case lower(Occupation) when 'doctor' then 1 when 'singer' then 2 when 'actor' then 3 when 'professor' then 4 end;

  • + 0 comments

    SELECT CONCAT(Name,"(",LEFT(Occupation,1),")") FROM OCCUPATIONS ORDER BY Name ASC; SELECT CONCAT("There are a total of ",COUNT(Name)," ",lower(Occupation),"s.") FROM OCCUPATIONS GROUP BY Occupation Order By COUNT(Name) ASC, lower(Occupation) ASC;

  • + 0 comments

    SELECT CONCAT(Name,"(",LEFT(Occupation,1),")") FROM OCCUPATIONS ORDER BY Name ASC; SELECT CONCAT("There are a total of ", count(OCCUPATION), " ", LOWER(OCCUPATION), "s.") FROM OCCUPATIONS GROUP BY OCCUPATION ORDER BY COUNT(OCCUPATION) ASC;

  • + 1 comment

    MySQL Solution

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

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