On Tue, Mar 4, 2008 at 10:57 AM, Esbach, Brandon
<[EMAIL PROTECTED]> wrote:
[snip!]
>  SELECT
>          t.pass, t.id
>  FROM
>         theTable t
>  GROUP BY
>         t.serial_number
>  ORDER BY
>         t.date desc

    Try adding the LIMIT keyword.

    SELECT t.pass, t.id FROM theTable t GROUP BY t.serial_number ORDER
BY t.date DESC LIMIT 0,1;

    That will give only the latest date.


-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

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

Reply via email to