Hi all, In my query I am selecting a subset (not the whole object) so my approach was as follows (SUBSTRING VALUE TRUNCS TIMESTAMP AT DAY)
SELECT new DataObject( SUBSTRING(timeStamp,1,10) as timeStamp, avg(dataReading) AS dataReading) FROM DataObject WHERE timeStamp BETWEEN starDate AND endDate GROUP BY timeStamp //this would be by day
what I expect is an object for each day what i receive is each object (not grouped)
I believe that it is making the objects first and then it is not able to group them... any suggestions???
|