Full query of data registered in a field

Asked

Viewed 167 times

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

  • @user3163662 You can use COUNT to count field results. Example: SELECT COUNT(*) FROM cadastro_cliente WHERE pais = "Brasil"

  • 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.

1 answer

7


A little vague but something like

Select pais,count(*) qtd
From tabela
Group by pais

Browser other questions tagged

You are not signed in. Login or sign up in order to post.