select case count(currentprice) when 60 then round(avg(currentprice),2) else 0 end as avg60 from (select currentprice from stocks where stockcode = '600795' order by closedate desc limit 803, 60) as t
计算均线数据,太慢了,limit 后面的数越大越慢。。