Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个问题表,我需要展示 20 个问题中的 TOP。我需要选择计数从最大计数到最小值的位置。
例如:我有 20 个什么问题?和 30 个关于 Wat 的问题?这里显示:Wat?| 30 什么?| 20
SELECT *, COUNT(question) AS q FROM stat_otp_questions ".$filter." GROUP BY question ORDER BY q LIMIT 20
谢谢
你可以ORDER BY q DESC这么说它降序排序
ORDER BY q DESC