mysql
Hy_164274021
这个作者很懒,什么都没留下…
展开
-
mysql 分组取前几条
mysql 分组取前几条set @num := 0, @type := ”;select *from (select id,type, data,@num := if(@type=type, @num + 1, 1) as row_number,@type := type as other_typefrom test corder by type, data desc) ...原创 2020-04-07 11:40:41 · 257 阅读 · 1 评论 -
mysql 按时间排序 取每5条数据的平均值、评价数
建表语句:CREATE TABLE `trade_params1` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `PERIOD` int(11) DEFAULT NULL, `THEDATE` date DEFAULT NULL, `DAYCOUNT` int(11) DEFAULT NULL, PRIMARY KEY (`ID`))...原创 2019-01-25 11:45:16 · 2715 阅读 · 0 评论