liyupi / sql-mother

免费的闯关式 SQL 自学教程网站,从 0 到 1 带大家掌握常用 SQL 语法,纯前端实现,简单易学~
http://sqlmother.yupi.icu
3.09k stars 354 forks source link

冒险者和金币答案 #3

Closed GGXXLL closed 11 months ago

GGXXLL commented 11 months ago

SELECT adventurer_id, adventurer_name, SUM(reward_coins) AS total_reward_coins FROM rewards GROUP BY adventurer_id, adventurer_name ORDER BY total_reward_coins DESC LIMIT 3;

group by adventurer_id 也对🐔

liyupi commented 11 months ago

被你发现了 🐶 感兴趣的话可以优化下题目数据和答案哈哈