My query pulls state, county and tax rates and the effective date for each. This is by a column called geocode. Since changes are made to rates over the years, there can be multiple rows for each geocode.
I have successfully created my query to pull the correct data and to order it using the effective dates. What I’d like is to return only 1 row of data (after the data is ordered) for each geocode. The order by is geocode, state effective date, county effective date then city effective date. Here is a sample of the results of the query
101031500 19880202 0.06 19900201 0.01 0 0
101031500 19880202 0.06 19900201 0.01 0 0
101031500 19880202 0.06 0 0 0 0
101031500 19880202 0.06 0 0 0 0
101031500 0 0.05 19900201 0.01 0 0
101031500 0 0.05 19900201 0.01 0 0
040010140 20130701 0.065 19960701 0.01 20091001 0.035
040010140 20130701 0.065 19960701 0.01 0 0.025
040010140 20130701 0.065 0 0.005 20091001 0.035
The first column is the geocode, for each unique value, return the first row, so I want to see this as the results of my query
101031500 19880202 0.06 19900201 0.01 0 0
040010140 20130701 0.065 19960701 0.01 20091001 0.035