Re: buildung query with ORM

2009-08-04 Thread krylatij
It's difficult to even imagine such query (possible but very inefficient), i think you need to change your architecture or do this grouping in bussines layer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: buildung query with ORM

2009-08-04 Thread tom
On 4 Aug., 16:40, krylatij wrote: > You need to use raw sql. (http://docs.djangoproject.com/en/dev/topics/ > db/sql/#topics-db-sql) yes. i know that i can use raw sql. but if it's possible, i want to use ORM. > > I don't understand what will be if there are more then 2 channels at > the same

Re: buildung query with ORM

2009-08-04 Thread krylatij
You need to use raw sql. (http://docs.djangoproject.com/en/dev/topics/ db/sql/#topics-db-sql) I don't understand what will be if there are more then 2 channels at the same datetime? So i can't provide you solutions sample. --~--~-~--~~~---~--~~ You received this me

Re: buildung query with ORM

2009-08-04 Thread Spajderix
tom pisze: > Hi group, > > i build a model to save measurement data. a measurement entry has > always a channel (that is the source where the data comes from), a > value (for example 1.04), a unit (for example m/s or Hz) and a > timestamp. > The timestamp and the channel are together unique. every