I'm using SQL Server 2008 R2 and I have the following table:
ID NUMERO NOME MODELO
--- ----------- ------ -------
1 12 A 777
2 23 A 777
3 05 A 777
4 45 B 999
5 65 C 555
6 30 B 999
7 67 B 999
8 80 C 555
9 51 C 555
10 03 C 555
I would like my query to return the following table:
ID NUMERO NOME MODELO
--- ----------- ------ -------
2 23 A 777
7 67 B 999
8 80 C 555
That is, I want you to return the records with the largest values in the NUMBER column between rows, regardless of how many records exist.