标签: mysql distinct
我希望选择所有列但不重复列存储(抱歉我的英文不好) 代码mysql:
SELECT * FROM store order by views DESC
这就是我想要的结果
答案 0 :(得分:1)
目前还不清楚你想要什么,但请尝试以下方法:
select * from store s1 join ( SELECT store, max(views) as views FROM store group by store ) s2 on s1.store = s2.store and s1.views = s2.views order by s1.views DESC