[sqlalchemy] subquery in select statement
- by webjunkie
Hi guys, I have two tables (albums,pictures) in a one to many relationship and I want to display each albums details with one picture so I have the following query
select albums.name,(select pictures.path from pictures where pictures.albumid=albums.id limit 1) as picture from albums where ...
Now I'm struggling creating this on Pylons with…