• + 0 comments

    This works for me:

    SELECT Name || '(' || SUBSTR(Occupation, 1, 1) || ')' AS name_occupation
    FROM OCCUPATIONS
    ORDER BY Name ASC;
    
    SELECT 'There are a total of ' || COUNT(*) || ' ' || LOWER(Occupation) || 's.'
    AS total_occupations
    FROM OCCUPATIONS
    GROUP BY Occupation
    ORDER BY COUNT(*) ASC, LOWER(Occupation);