avaemaPolygon : Transaction per hour, minute and second
Updated 2022-07-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with total as (select count(1) as total_count ,trunc(block_timestamp,'DAY') as days
from polygon.core.fact_transactions
where trunc(block_timestamp,'DAY') >= getdate() - interval '120 days'
group by 2)
, success as
(select count(1) as success_count ,trunc(block_timestamp,'DAY') as days
from polygon.core.fact_transactions
where status='SUCCESS' and trunc(block_timestamp,'DAY') >= getdate() - interval '120 days'
group by 2)
, fail as
(select count(1) as fail_count ,trunc(block_timestamp,'DAY') as days
from polygon.core.fact_transactions
where status='FAIL' and trunc(block_timestamp,'DAY') >= getdate() - interval '120 days'
group by 2)
select total_count/24 as per_hour , total_count/(24*60) as per_minute , total_count/(24*60*60) as per_second , days from total
Run a query to Download Data