Re: ORM PostgreSQL stuff

2016-11-26 Thread Avraham Serour
I didn't quite understood the question, you want to find the division of two prices for each item, but each item has only one price according to the model you posted. can you express what you want to accomplish in python or SQL? On Sat, Nov 26, 2016 at 10:15 PM, Artem Bernatskyy < artem.bernats..

ORM PostgreSQL stuff

2016-11-26 Thread Artem Bernatskyy
Hello Is it possible to do in ORM or in PostgreSQL Assume we have a table with date and price # class Item(models.Model): #price = models.DecimalField() #date = models.DateField() We need for every item in table find division of two prices by two dates and then order_by that result of