SQL Query where I get most recent rows from timestamp from another table
问题 I've got some sensory information going into a table. I have figured out the query that will tell me exactly when the value at a particular device changes. What I need to know is the status of all of the other sensors at that time. The trick is, the timestamps won't be equal. I could get a data point from sensor 1, then 3 minute later, one from sensor 2, and then 30 seconds later, another from sensor 1. So, here is an example of what I am talking about: --- data_table --- sensor | state |