是否可以使用关键字来按结果在数据表中出现的次数对我的 SELECT QUERY 中的结果进行排序?
MySQL:
SELECT * FROM interests ORDER BY (keyword)
表值:
hiking
running
swimming
hiking
photography
swimming
hiking
如果返回它们的顺序基于表中每个值出现的频率,它将是:
hiking
hiking
hiking
swimming
swimming
running
photography
如果没有一个特定的关键字,我如何使用 SQL 来实现这一点?
谢谢