如何计算按小时登录的用户ID数量? [英] How to count how many userid are log-in by hour?

查看:105
本文介绍了如何计算按小时登录的用户ID数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在没有脚本,但也许我会把我的问题写成文字和我想做的例子。


我想算一下有多少用户每小时登录一次。这是为了衡量系统利用率。用户随时进入并注销。

表格如下

I don’t have scripts right now but maybe I’ll put my problem into words and examples of what I wanted to do.

I want to count how many user is login in every hour. This is to measure system utilization. The user’s come in and log out anytime of the day.
Table looks like this

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号

推荐答案

按登录时间分组。您可能还需要在select子句中登录小时。
Group by the hour of the log in. You may also want the hour of the log in in the select clause.


@ddtpmyra ,这些是你要找的结果吗?
@ddtpmyra, are these the results that you are looking for?
展开 | 选择 | Wrap | 行号


Adezii,


是的我想计算每小时当前登录的数量。我想捕捉他们甚至早早登记,比如早上8点而不是退出,因为10点以后,我想算上午10点。并且他们有时间登录并注销,我无法配置查询如何执行此操作。
Adezii,

Yes I want to count how many currently login on each hour. I wanted to capture even they log at early times like 8am and not logout since after 10, I wanted to be counted on the 10am. And there are time they will be login and logging out, I can''t configure a query how to do this.


这篇关于如何计算按小时登录的用户ID数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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