Re: multiple inner joins in sql

2007-07-11 Thread novice
cool, the underscore seems to be the problem. Now to the second question. What will be the best way to do this? I mean to get the top N categories with the most offers, and from this top categories get the top M offers that have the highest percentage discount, that is what my not so nice SQL

Re: multiple inner joins in sql

2007-07-11 Thread cesco
Thanks:-) On Jul 11, 3:10 am, Nathan Ostgard <[EMAIL PROTECTED]> wrote: > On Jul 10, 2:58 pm, novice <[EMAIL PROTECTED]> wrote: > > > but I get error that the offers_offerprice.offerseller_id column > > doesnt exist. > > I think you're missing an underscore. Your model has the field named >

Re: multiple inner joins in sql

2007-07-10 Thread Nathan Ostgard
On Jul 10, 2:58 pm, novice <[EMAIL PROTECTED]> wrote: > but I get error that the offers_offerprice.offerseller_id column > doesnt exist. I think you're missing an underscore. Your model has the field named offer_seller... shouldn't it then be offers_offerprice.offer_seller_id?

multiple inner joins in sql

2007-07-10 Thread novice
Hi all, I have these questions regarding some sql queries which I was able to do in msacess but i wasnot with django which is using mysql database...sorry for the length mail, but i am just trying to make the question as clear as possible... I have a table structure something like this: which