View previous topic :: View next topic |
Author |
Message |
sunz Beginner
Joined: 22 Feb 2011 Posts: 6 Topics: 3
|
Posted: Thu Mar 03, 2011 9:52 pm Post subject: Group by hourly time |
|
|
Hi
I want to count the number of records between each hour using the timestamp column. Do we have any function that can be used for this in the Group by clause. Thank you.
Code: |
TYPE Timestamp
------- ------------------------------------
RD 2009-10-01-01.29.49.937718
RD 2009-10-01-12.07.49.774781
RD 2009-10-01-01.56.59.436038
RD 2009-10-01-01.22.51.201398
RD 2009-10-01-01.11.57.089807
RD 2009-10-01-01.19.50.136999
RD 2009-10-02-01.38.49.814558
RD 2009-10-02-02.08.49.766543
RD 2009-10-02-12.30.50.346080
RD 2009-10-02-01.43.23.994274
|
Expected output
Code: |
Date Hour No of Records
---------- ------ ----------------
2009-10-01 12 1
2009-10-01 1 5
2009-10-02 12 1
2009-10-02 1 2
2009-10-02 2 3
|
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
sunz Beginner
Joined: 22 Feb 2011 Posts: 6 Topics: 3
|
Posted: Fri Mar 04, 2011 11:34 am Post subject: |
|
|
Kolusu
The query worked. Thank you so much |
|
Back to top |
|
|
|
|