I need some help, I have to implement this sql query in zend2:
SET @i:=-1; SELECT COUNT(*) AS cnt, AVG(ch01) AS ch01avg FROM (
SELECT @i:=@i+1 AS rownum,FLOOR(@i/60) AS GGG,ch01
FROM binTable
WHERE SUBDATE(NOW(),INTERVAL 11 DAY)<= start_date_time
)AS t GROUP BY GGG;
Feel free to use any other sql query as long it fulfulls the purpose, which is: getting the average of ch01 of every 60 entries.
Im not a native english speaker, Im eastern european :D.