sql中limit和汇总函数的集合使用

limit和求和一起

select SUM(A.high) from (select * from minute1_K order by DateTime desc limit 10) A

limit和avg一起

select avg(A.AskVolume1) from (select * from DepthMarketData order by UpdateTime DESC limit 300) A

limit和max一起

select max(A.AskVolume1) from (select * from DepthMarketData order by UpdateTime DESC limit 300) A

limit和min一起

select min(A.AskVolume1) from (select * from DepthMarketData order by UpdateTime DESC limit 300) A

posted on 2016-05-12 23:41  帅胡  阅读(1715)  评论(0编辑  收藏  举报

导航