select の入れ子 って感じに書く
select avg(current) from (select current from tbl_data where code=9984 and date<=20160310 order by date DESC limit 5) items;
ネタ元
select の入れ子 って感じに書く
select avg(current) from (select current from tbl_data where code=9984 and date<=20160310 order by date DESC limit 5) items;
ネタ元