Unique records based on Account & Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been able to sucessfully bring my table of 280,000 records down to
1,600 and need help with the final step.

My table contains two main criteria, 1) Account Number, and 2) Date of the
transaction. Because I have to work with data exported from another
application I am forced to work with the table as defined.

From my list of records there are about 250 Accounts Numbers which have only
one record (Date of Transaction), the remainder of the records are Account
Numbers have multiple entries with unique Dates of Transaction.

I want to create a querie that will show me only one record for each account
number where, the one record is the record with the most RECENT date.
 
To save everyone some time; I solved the issue.

1:

SELECT Plot_Trucks.SEGID, Max(Plot_Trucks.I_DATE) AS [Date]
FROM Plot_Trucks
GROUP BY Plot_Trucks.SEGID;

2.

A second query to bring in the other frield from my Table based on Date and
SegId.
 
Back
Top