On Sat, 06 Mar 2004 20:40:24 -0600, Paul DuBois wrote:

>
> You can use your LIMIT clause as well, as long as by that you don't
> mean "5 most recent from *each* table".
>

This seems similar to something I'm working on which I haven't sorted
out to my satisfaction yet.

We have a system that collects and stores data that is time stamped in
a mysql database. There is data from 40 sensors and it does not arrive
at exactly the same time so each sensor reading and it's time stamp
are stored. The table contains a date/time, the sensor ID, and the
value.

One request is to have a web page that will display each sensor and
it's most recent measurement so the most recent is always shown.
regardless of which sensor it came from. How do I create a query that
will extract the most recent data (latest date) from the database for
each of the sensors and have it sorted it by the sensor ID?

This isn't obvious to me from reading the documentation on queries and
I've been searching and reading through messages without success yet.
I suspect a big part of the problem is I'm fairly new to sql queries
and am not exactly sure what terms to search for.

Tim


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to