I have a simple query on Oracle v11 to group and count records, nothing special:
select ADDR, count(ADDR) from DBTB group by ADDR;
The rable have also the TIMESTAMP column, what I'm trying to do is group and count unique ADDR by hour. e.g. on table:
TIMESTAMP ADDR
19-OCT-2021 17:15:00 12345
19-OCT-2021 17:20:00 12345
19-OCT-2021 17:25:00 12345
19-OCT-2021 17:27:00 67890
19-OCT-2021 18:10:00 55555
19-OCT-2021 18:20:00 55555
19-OCT-2021 18:30:00 66666
19-OCT-2021 18:43:00 77777
The output should be:
HOUR COUNT
17 2
18 3
Could someone help me to do a query to count and group the same ADDR split by hour? Thank you Lucas