View previous topic :: View next topic
|
Author |
Message |
Chidane
New User
Joined: 25 Nov 2021 Posts: 19 Location: India
|
|
|
|
Hi Team,
Could you please help me with the following requirement.
I would like to get the count of number of rows from TABLE_A for every 1 hour of timestamp range.
The below query gives count of rows for the whole day.
I would like to know the count of rows of every 1 hour in this timestamp range. That means I should get 24 entries.
Code: |
SELECT COUNT(*) FROM TABLE_A WHERE TSTAMP BETWEEN
'2024-02-01-00.00.00.000001' AND '2024-02-02-00.00.00.000001' |
Could you please help me here to achieve this.
Thanks |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Set up job to run every one hour using scheduling and ftp the couns. |
|
Back to top |
|
|
Chidane
New User
Joined: 25 Nov 2021 Posts: 19 Location: India
|
|
|
|
We wil be setting up the job every 1 hour to get the details from table. But before that we would like to know the count of rows for every 1 hour as part of aalysis purpose.
We can manually change the hour in SQL query and run it 24 times. However requesting to check whether in single query run, whether we can get the requested details (count of rows that got updated every 1 hour of given timestamp of a day). |
|
Back to top |
|
|
Chidane
New User
Joined: 25 Nov 2021 Posts: 19 Location: India
|
|
|
|
Any help is appreciated, please.
Thanks |
|
Back to top |
|
|
|