Re: [sqlalchemy] double outerjoin

2013-03-25 Thread Michael Bayer
On Mar 25, 2013, at 1:54 AM, Michal Nowikowski godf...@gmail.com wrote: I got to the point where proper raw SQL query looks as follows: SELECT A.id AS a_id, B_1.id AS b1_id, B_2.id AS b2_id, FROM A LEFT OUTER JOIN B AS B_1 ON A.id = B_1.a_id AND B_1.c_id = 66 LEFT

[sqlalchemy] double outerjoin

2013-03-24 Thread Michal Nowikowski
Hello, I need to do double outer join on following 2 tables A and B to get presented result using ORM query or SQL expressions. Table B should be outer joined twice to get joined 2 result sets (distinguished by c_id) that are for the same A records. Outer join is used to get NULLs where B