按类别排名前n位 [英] Top n by category

查看:71
本文介绍了按类别排名前n位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了简单起见 - 我开发了以下表格:


姓名薪资体育

Roger Clemens 28,000,000棒球

David Ortiz 1 8,000,000棒球

Kobe Bryant 15,000,000篮球

Phil Mickelson 20,000,000高尔夫球

老虎伍兹30,000,000高尔夫球


我试图查询每项运动的最高薪水。


结果应该是:

姓名薪资运动

Roger克莱门斯28000000棒球

科比布莱恩特15000000篮球

老虎伍兹30000000高尔夫


帮助???

For simplcity sake - I developed a table of the following:

Name Salary Sport
Roger Clemens 28,000,000 Baseball
David Ortiz 1 8,000,000 Baseball
Kobe Bryant 15,000,000 Basketball
Phil Mickelson 20,000,000 Golf
Tiger Woods 30,000,000 Golf

I am trying to queries the top salary per sport.

Results should be:
Name Salary Sport
Roger Clemens 28000000 Baseball
Kobe Bryant 15000000 Basketball
Tiger Woods 30000000 Golf

HELP???

推荐答案


为简单起见 - 我开发了以下表格:


姓名薪资体育

Roger Clemens 28,000,000棒球

David Ortiz 1 8,000,000棒球

Kobe Bryant 15,000,000篮球

Phil Mickelson 20,000,000高尔夫球

老虎伍兹30,000,000高尔夫球


我试图查询每项运动的最高薪水。结果应该是:

姓名薪水运动

Roger Clemens 28000000棒球

科比布莱恩特15000000篮球

老虎伍兹30000000高尔夫


帮助???
For simplcity sake - I developed a table of the following:

Name Salary Sport
Roger Clemens 28,000,000 Baseball
David Ortiz 1 8,000,000 Baseball
Kobe Bryant 15,000,000 Basketball
Phil Mickelson 20,000,000 Golf
Tiger Woods 30,000,000 Golf

I am trying to queries the top salary per sport.

Results should be:
Name Salary Sport
Roger Clemens 28000000 Baseball
Kobe Bryant 15000000 Basketball
Tiger Woods 30000000 Golf

HELP???

展开 | 选择 < span class =codeDivider> | Wrap | 行号


展开 | 选择 | Wrap | 行号



它起到了一定的作用,但我怎么也包括这个名字?
It worked to a point, but how do i also include the name too?



我如何包含名称?

how do i also include the name ?


这篇关于按类别排名前n位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆