-1
I have a table that has several records with the same information, example:
id | nome | profissao
1 Carlos Pedreiro
2 Jean Garçon
3 Victor Pedreiro
4 Ana Paula Secretaria
5 Paula Secretaria
6 Karina Balconista
What I need to count is the amount of profession but without repeating, in the example I gave, has 6 records, but only has 4 different professions, this is what I need to count, I do not know how to count but without repeating
After that just give a rowCount()?
– Otavio Fagundes
The way the
SELECT
, it will return a query with two fields. A callprofissao
with the name of the profession and another field calledtotal
, showing the amount of the same.– Thiago Magalhães
It worked fine, thank you!
– Otavio Fagundes