Re: Average 16 rows back?
> I would like to average the last 16 rows
The "last" in order of date & time? That would be ...
select avg(wh) from (select wh from tbl order by date,time desc limit 16);
But it sounds as if you need running averages, eg see "Group data by datetime periods" at
http://www.artfulsoftware.com/infotree/queries.php
> wh are pending all between 120 to over 500 mostly between 150 and 200
You mean trending?
Subject
Written By
Posted
Re: Average 16 rows back?
October 23, 2016 09:46AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.