• + 0 comments

    Thanks for the query using || ''|| because I am used to this. I forgot to lower(occupation) in query 2. but you are mising 'a' inside the fisrt line of 2nd query select 'There are total' || ' ' ||

    it will be select 'There are a total of' || ' ' ||

    my comple query is :

    select name ||'(' || substr((occupation), 1,1) || ')' as "Name" from occupations order by Name asc;

    select 'There are a total of' || ' ' || count(occupation) || ' ' || lower(occupation) || 's.' as "Total" from occupations group by occupation order by "Total";