• Post Reply Bookmark Topic Watch Topic
  • New Topic

combining AVG with object creation in H QL

 
Alexander Curvers
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
select new DeviceMeasurement( AVG(d.weight), AVG(d.bmi), AVG(d.boneMass), AVG(d.muscleMass), AVG(d.visceralFat), AVG(d.bodyFat), AVG(d.bodyWater) ) from DeviceMeasurement as d where d.clientDateTime >= :startDate AND d.clientDateTime <= :endDate AND d.dashboardUser = :dashboardUser GROUP BY d.dashboardUser

doesnt work, get some result though without the new DeviceMeasurement( ... ) added

(note: the constructor exists and adding package before DeviceMeasurement isnt the prob)

rg Alex
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!