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.
我有一张满是用户的表,使用下面的查询,我可以得到最高分除以分数的结果:
SELECT MAX(points/score) FROM table
但是,我想获取与结果关联的用户;有什么建议么?
SELECT * FROM table ORDER BY points/score DESC LIMIT 1
只需排序points/score并将结果限制为一个:
points/score