У меня есть таблица с 2 полями name
, occupation
Я должен отобразить следующий результат:
There are a total of 2 doctors.
There are a total of 2 singers.
There are a total of 3 actors.
There are a total of 3 professors.
Мой код
SELECT CONCAT('There are a total of' , COUNT(OCCUPATION) , name )
from occupations;
group by occupation
order by count(occupation);