substring_index(group_concat(distinct num order by num desc),',',3)
转载于:https://www.cnblogs.com/LYliangying/p/9576550.html
本文介绍了一种使用SQL的substring_index与group_concat函数结合distinctnumorderbynumdesc的方法来实现特定的数据分组与排序需求。这种方法可以有效地从数据库中获取前几条具有代表性的记录。
substring_index(group_concat(distinct num order by num desc),',',3)
转载于:https://www.cnblogs.com/LYliangying/p/9576550.html

被折叠的 条评论
为什么被折叠?