Athena - SQL 按订单计数获取客户计数
我有一个包含客户计数和订单计数的表,如下所示:
Customer Order_Count
A 5
B 7
C 5
D 4
E 1
F 1
G 1
如何编写 SQL 来按订单获取客户计数?结果如下:
Orders Customer_Count
7 1
5 2
4 1
1 3
I have a table with custome rcount and order count as below:
Customer Order_Count
A 5
B 7
C 5
D 4
E 1
F 1
G 1
How do I write the SQL to get customer count by orders? The result would be as below:
Orders Customer_Count
7 1
5 2
4 1
1 3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用
Group by
并获取客户数量,如下所示:you use
Group by
and get count of customer like this: