View Single Post

   
  #2 (permalink)  
Old 03-17-2008, 06:13 AM
Erick T. Barkhuis
 
Posts: n/a
Default Re: Need Help with select

Karlheinz Klingbeil:

> So the question is, how can i retrieve this newest row for a list of "rezeptur_id"s ?
>
> "select datum from buchungen where rezeptur_id in (10,20,30) order by datum desc limit 1;


Not tested:

select max(datum)
from buchungen
where rezeptur_id in (10,20,30)
group by rezeptur_id
order by rezeptur_id

--
Erick
Reply With Quote