检查哪个成员拥有最多的连接
我想创建一个基于 Excel 文件的查询。
我有一个两列的表格,显示朋友之间的交易。 我想知道哪个成员的朋友最多(不管他是否有报酬或付钱)。
当然,同一个人之间的两次交易算作一次(我想查看有多少朋友,而不是他付款/收到付款的次数) 表
已 | 付款 |
---|---|
18 | 14 |
1 | 17 |
20 | 12 |
11 | 12 |
8 | 20 |
3 | 6 |
4 | 2 |
20 | 9 |
10 | 8 |
20 | 5 |
16 | 14 |
2 | 5 |
1 | 12 |
10 | 14 |
3 | 6 |
4 | 14 |
2 | 6 |
11 | 14 |
I want to create a query, based on excel file.
I have a two columns table that shows transactions between friends.
I want to know which member has the most friends (it doesn't matter if he being paid or pays money).
Of course, two transations to or from the same person counts as one (I want to see how many friends, not how many times did he pay/got paid)
table
paid | pays |
---|---|
18 | 14 |
1 | 17 |
20 | 12 |
11 | 12 |
8 | 20 |
3 | 6 |
4 | 2 |
20 | 9 |
10 | 8 |
20 | 5 |
16 | 14 |
2 | 5 |
1 | 12 |
10 | 14 |
3 | 6 |
4 | 14 |
2 | 6 |
11 | 14 |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从子查询中选择最大值,如下例所示
select max value from sub query like below example