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.
试着看看哪个球员进球最多。
Player_id Goals.
我尝试了以下语句:
select player_id, sum(goals) as total from matchstat group by player_id order by total desc limit 1;
但我得到错误:
SQL 命令未正确结束。
有人看到查询的问题吗?
Oracle 不支持limit 子句。尝试
SELECT * FROM (SELECT "player_id", SUM("goals") AS total FROM matchstat GROUP BY "player_id" ORDER BY total DESC) a WHERE ROWNUM <= 1
查看演示