[Solved] filtering last entry of each location
Posted: Wed Dec 12, 2018 4:13 am
new here, did lots of searching and couldn't find the statement to find the answer my mind is looking for.
i have a database with fields as: StartDate, LocationID, EmployeeID, Equipment
all in a table named: Table1
i found the following code to filter the data, getting the max "StartDate" field and displaying the remainder fields. which works fine... as long as all the multiple location's latest start date is the same date, which it will not be.
can anyone point me to where to find something, or give me the code that will get me a query on getting the latest "StartDate" of each of the different "LocationID" 's please?
i have a database with fields as: StartDate, LocationID, EmployeeID, Equipment
all in a table named: Table1
i found the following code to filter the data, getting the max "StartDate" field and displaying the remainder fields. which works fine... as long as all the multiple location's latest start date is the same date, which it will not be.
Code: Select all
SELECT * FROM "Table1" WHERE "StartDate" = ( SELECT MAX( "StartDate" ) FROM "Table1" )