1
I’m having a hard time building an SQL. have a table addressee with the strings fields street and crossing. I need to count the numbers of records that have the same crossing and group them 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 someone shed some light? Thank you.
The tag combination of your question is a little ambiguous; You want an SQL to postgre or an HQL to Hibernate?
– Genos
You want the SQL script to recognize that Rua Brasil Rua Parana and Rua Parana Rua Brasil is the same intersection?
– Reginaldo Rigo
whatever
– Alexandre Silva