On 16/05/07, Glauco <[EMAIL PROTECTED]> wrote:
>
> are you searhing for ?
>
> select max( changeTime ) from OrderDiscount group by orderID ; ?
>
> i don't understand well what you are searching for
>
Thanks to all of you!
I actually needed the last message itself - more than just its date.
Tha
are you searhing for ?
select max( changeTime ) from OrderDiscount group by orderID ; ?
i don't understand well what you are searching for
Glauco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" g
I wrote a similar query in SQLObject - in one query it retrieves the most
recent discount for every order in the list orderIDs. The code is below; it
should be pretty easy to translate to SQLAlchemy.
The technique is to use nested SQL queries - the innermost query uses MAX to
determine the most
YourMessageMapper.select_by( tbl['users'].c.id == $$$, order_by=
[desc(tbl[messages'].c.data)], limit=1)
this is your last message for $$$ person
Glauco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalch