I have a database where I have records that come in sets of two. For example, these records will have the same Rec_ID and Veh_ID. I need to get these duplicates and then find the one with the higher Axl_Rating. Then I need to include that value in a query that hits multiple tables.
I would like my query to return the rows denoted by stars:
Rec_ID Veh_ID Axl_Rating
2 6 5.0**
2 6 4.0
3 5 7.0**
3 5 3.0
Then I would like to combine those results with associated values from some tables with relationships to this table:
Select 'fields from above',c.other_field, d.other_field from table1 a, table2 b table3 c, table4 d where a.field =b.field and b.field = c.field...ect...
I hope this make sense...