Re: [sqlalchemy] Better way of joining a table in two different ways?

2015-12-24 Thread Sohail Khan
Thanks, that is much more concise than what I came up with. For some reason I wasn't able to specify the columns as orig.c.latitude. I had to use orig.c.state_latlon_latitude. Here is what I ended up with: state_latlon_joined = FIPS_States.join( state_latlon,

Re: [sqlalchemy] Better way of joining a table in two different ways?

2015-12-24 Thread Mike Bayer
On 12/24/2015 12:12 AM, Sohail Khan wrote: > I couldn't figure out a better description or explanation on what I'm > trying to do so I instead wrote a sql query that I want to perform and > tried getting as close as possible to a result that I wanted. I wanted > to know if there was a better

[sqlalchemy] Better way of joining a table in two different ways?

2015-12-23 Thread Sohail Khan
I couldn't figure out a better description or explanation on what I'm trying to do so I instead wrote a sql query that I want to perform and tried getting as close as possible to a result that I wanted. I wanted to know if there was a better way of doing this. t = text(""" SELECT