[ad_1]
I have a database with the following columns
Data | timeAdded | status
a | 2022-01-05T00:00:00.0000 | sent
a | 2022-01-05T00:10:00.0000 | received
a | 2022-01-05T00:17:00.0000 | sent
a | 2022-01-05T11:21:00.0000 | sent
a | 2022-01-05T11:29:00.0000 | received
b | 2022-01-05T15:09:00.0000 | sent
a | 2022-01-05T17:29:02.0000 | rejected
b | 2022-01-05T18:09:30.0000 | sent
The timeAdded column is a type of string. I need a sql query to find count for how many times data ‘a’ occured in each 30 mins, throughout a day.
so the result would be
Data | Time | count
a |2022-01-05T00:00:00.0000 | 3
a |2022-01-05T00:30:00.0000 | 0
a |2022-01-05T01:00:00.0000 | 0
.
.
.
a |2022-01-05T11:00:00.0000 | 2
and so on for 24 hours.
[ad_2]