1
I have a table where a country field is defined. I want to know how I can develop a query that shows me how many records I have for each country.
Example:
Brazil: 10 registrations
USA: 5 records
1
I have a table where a country field is defined. I want to know how I can develop a query that shows me how many records I have for each country.
Example:
Brazil: 10 registrations
USA: 5 records
7
A little vague but something like
Select pais,count(*) qtd
From tabela
Group by pais
Hey! Thanks, get me guided with this and answer other questions!
@user3163662, check out How and why to accept an answer? ;)
Browser other questions tagged mysql sql
You are not signed in. Login or sign up in order to post.
@user3163662 You can use COUNT to count field results. Example:
SELECT COUNT(*) FROM cadastro_cliente WHERE pais = "Brasil"
– Hy-brazil
Yes, but in this case it would be for certain parents, as this table is the place where I keep access statistics.. It would not work very well.
– Vinícius Lara