Link to home
Start Free TrialLog in
Avatar of sukhoi35
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!
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

What database?

It should be:
select time_record, count(*) from some_table group by time_record;

Without knowing more it is hard to provide exact SQL.
Avatar of sukhoi35

ASKER

Thanks Netminder, this is oracle db. Will try your query.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you Netminder! I am able to see what I wanted.