sukhoi35
asked on
How to find count of the occurrences of a value?
Experts,
In a time column like below, how can I find the occurrence count of all the times?
2018-02-25 23:30:52
2018-02-25 23:30:56
2018-02-25 23:30:56
2018-02-25 23:31:00
2018-02-25 23:31:00
2018-02-25 23:31:04
2018-02-25 23:31:04
2018-02-25 23:31:08
2018-02-25 23:31:08
2018-02-25 23:31:12
2018-02-25 23:31:12
2018-02-25 23:31:15
2018-02-25 23:31:15
2018-02-25 23:31:15
For the above time entries column 'TIME RECORD', I would need something like:
2018-02-25 23:30:52 1
2018-02-25 23:30:56 2
.
.
.
2018-02-25 23:31:15 3
Thanks in advance!
In a time column like below, how can I find the occurrence count of all the times?
2018-02-25 23:30:52
2018-02-25 23:30:56
2018-02-25 23:30:56
2018-02-25 23:31:00
2018-02-25 23:31:00
2018-02-25 23:31:04
2018-02-25 23:31:04
2018-02-25 23:31:08
2018-02-25 23:31:08
2018-02-25 23:31:12
2018-02-25 23:31:12
2018-02-25 23:31:15
2018-02-25 23:31:15
2018-02-25 23:31:15
For the above time entries column 'TIME RECORD', I would need something like:
2018-02-25 23:30:52 1
2018-02-25 23:30:56 2
.
.
.
2018-02-25 23:31:15 3
Thanks in advance!
ASKER
Thanks Netminder, this is oracle db. Will try your query.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Netminder! I am able to see what I wanted.
It should be:
select time_record, count(*) from some_table group by time_record;
Without knowing more it is hard to provide exact SQL.