I hope you can deduce what i am asking from the excel spreadsheet
it has 3 tables listed and the desired results. I don't know how to write this query.
the problem area is the gallons table.
please refer to spreadsheet.
it has to do with selecting row data from a max value where the max value is not known. and then a 2nd max also