计算每个用户的事件数量
我的表格与此类似:
ID | event | user | time | note | archived
我需要单个用户去过的事件数量,但是一个用户可以在一个事件中拥有一个以上的记录,因此我只需要对其进行计数。
结果应该像这样:
user | nrofevents
感谢您的任何建议。
i have table similar to this:
ID | event | user | time | note | archived
I need the number of events that individual users have been to, but one user can have more than one record for one event, so I only need to count it once.
The result should look like this:
user | nrofevents
Thank you for any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能只是您需要的不同的使用吗?
Possibly it's just the use of distinct you need?