RamaharGNS vs Polygon
Updated 2022-11-06Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with gns_data as (
select block_timestamp::date as dayz,
sum (event_inputs:value/1e18) as gns_vol,
count (distinct tx_hash) as gns_tx
from polygon.core.fact_event_logs
where contract_address = '0xe5417af564e4bfda1c483642db72007871397896'
and event_name = 'Transfer'
and tx_status= 'SUCCESS'
group by 1)
select block_timestamp::date as dt,
gns_vol,
gns_tx,
count (distinct tx_hash) as poly_tx,
count (distinct from_address) as poly_user
from polygon.core.fact_transactions a join gns_data b on a.block_timestamp::Date = b.dayz
where status = 'SUCCESS'
group by 1,2,3
having dt >= CURRENT_DATE - {{PERIOD}} AND dt < CURRENT_DATE
order by 1
Run a query to Download Data