[sqlalchemy] Re: ratio on multiple tables

2008-10-10 Thread Michael Bayer
On Oct 9, 2008, at 10:01 PM, John Hunter wrote: > To simplify the problem, I have written code that simply connects the > "reportdate" of the fundamental data with a give price data point, eg > > class PriceData(Base): > __tablename__ = 'price_data' > > ticker = sa.Column(sa.String(12), prim

[sqlalchemy] Re: ratio on multiple tables

2008-10-10 Thread John Hunter
On Thu, Oct 9, 2008 at 9:01 PM, John Hunter <[EMAIL PROTECTED]> wrote: >> if the attribute is "attached" to either PriceData or FundamentalData, >> the general route towards this kind of thing is to use >> column_property(). You can place subqueries which correlate to the >> base table in those

[sqlalchemy] Re: ratio on multiple tables

2008-10-09 Thread John Hunter
On Thu, Oct 9, 2008 at 6:28 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Oct 9, 2008, at 3:28 PM, John Hunter wrote: > >> >> I have some tables with financial data -- one table has price data on >> a given date and another data has fundamental data on a given report >> date. I am wonderi

[sqlalchemy] Re: ratio on multiple tables

2008-10-09 Thread Michael Bayer
On Oct 9, 2008, at 3:28 PM, John Hunter wrote: > > I have some tables with financial data -- one table has price data on > a given date and another data has fundamental data on a given report > date. I am wondering if it is possible to create another object that > is a ratio on a join between v