If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
bring related fields into a query that uses MaxofDate and GROUPBY
.... why dont you just add them to your normal query i see no reason to
use a sub query SELECT GPSLocations.Individual_ID, GPSLocations.LatWGS84,GPSLocations.LongWGS84 ,Max(GPSLocations.Date) AS MaxOfDate FROM GPSLocations GROUP BY GPSLocations.Individual_ID,GPSLocations.LatWGS84,G PSLocations.LongWGS84; hope this helps Regards Kelvan |
#2
|
|||
|
|||
bring related fields into a query that uses MaxofDate and GROU
That was the first thing I tried, but what it produces is a MaxDate for each
unique combination of [Individual_ID, lat, and long] which is about 95% of all the records. (These animals don't stay still for very long!). I need a MaxDate for each unique combination of Individual_ID (i.e. one date per individual) with the lat/long of just that one locate. Jey "Lord Kelvan" wrote: .... why dont you just add them to your normal query i see no reason to use a sub query SELECT GPSLocations.Individual_ID, GPSLocations.LatWGS84,GPSLocations.LongWGS84 ,Max(GPSLocations.Date) AS MaxOfDate FROM GPSLocations GROUP BY GPSLocations.Individual_ID,GPSLocations.LatWGS84,G PSLocations.LongWGS84; hope this helps Regards Kelvan |
Thread Tools | |
Display Modes | |
|
|