I'm having a hard time building a SQL. I have a address table with the street and crossover fields. I need to count the numbers of records that have the same crossover and group them together Example:
id | rua | Cruzamento
1 | Rua Brasil | Rua Parana
2 | Rua Parana | Rua Brasil
3 | Rua Brasil |
4 | Rua Parana |
5 | Rua Brasil | Rua Parana
6 | Rua Parana | Rua São Paulo
The query should return:
cont | descricao
3 | Rua Brasil - Rua Parana
1 | Rua Parana - Rua São Paulo
Can anyone give a light? Thank you.