I’ve had a good dig around and while I can find hints on how to achieve this I can’t quite get to see the full solution.
I have a table (t_splits) in which records get streamed in from multiple sources. Each row contains an ID (split_id – auto-increment), a time (split_time) in the format HH:MM:SS (which is time local to where the record originated) and a timestamp column (inserted_ts – which is, obv, the time the record was inserted).
This table is populated over time via a socket-server listening for these streams.
What I want to then do is to select any records that were inserted more than, say, 10 seconds ago sorted by HH:MM:SS column earliest time first.
SELECT *
FROM t_splits
WHERE ?? (something to do with inserted_ts and Now and the 10 sec delay)
ORDER BY ?? (something using HH, MM & SS)
It will be a bit more complicated in real life but that’s the basic setup.
Any help would be greatly appreciated.
Thanks
Nymor
( assuming “earliest time” means oldest first )