Update with last known location? - Mailing list pgsql-novice

From James David Smith
Subject Update with last known location?
Date
Msg-id CAMu32ABKpNiE3qyDe7CO-sqq=KOJpX0PmO6NEcoEcWxUXp1i=Q@mail.gmail.com
Whole thread Raw
Responses Re: Update with last known location?  (Daniel Staal <DStaal@usa.net>)
List pgsql-novice
Dear all,

I have a large table of data which has about 75,000 people's locations
per minute of the day for a 24 hour period. The columns are:

ppid (person ID)
point_time (timestamp)
the_geom (geometry point)

My problem is that some (alot) of the info from the location
(the_geom) column is missing. This column needs updating with the last
known location of the person. The attached screenshot explains a bit
better than I am managing too in writing. In the attached image,
the_geom column from 14:41 to 14:51 would be updated with the data
from the 14:40.

I'm struggling conceptually as to how to do this. Some sort of
self-join on the table I think. But how to get the right data for the
update?

Does anyone have any clever ideas?

Thanks

JDS

Attachment

pgsql-novice by date:

Previous
From: Sameer Kumar
Date:
Subject: Re: archive folder maintenance
Next
From: Daniel Staal
Date:
Subject: Re: Update with last known location?