Hello, I'm pretty much an SQL newbie, so I don't know how to do this in SQL, but I want to do it in SQLAlchemy, so I hope you'll agree to help.
I have a users table and a messages table. Each message belongs to a user. Each message has a date. I want to select the last message for each user, according to the date (actually I'm only interested in the date). I know I can first select all users and then issue a select for each user to get the last message. But is it possible to do it with only one select, to save DB queries? Thanks, Noam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
