Moe3 Gains Network
Updated 2023-02-08Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
select
date_trunc ('{{scale}}',block_timestamp)::date as date,
case
when CONTRACT_ADDRESS=lower('0xE5417Af564e4bFDA1c483642db72007871397896') then 'GNS token'
else 'Others ' end as type ,
count(tx_hash) as txns,
count(distinct ORIGIN_FROM_ADDRESS) as users,
sum(txns) over (partition by type order by date rows between unbounded preceding and current row) as cum_transfer,
sum(users) over (partition by type order by date rows between unbounded preceding and current row) as cum_users
from Polygon.core.fact_token_transfers
where BLOCK_TIMESTAMP>=CURRENT_DATE - {{Days_back}}
group by 1,2
Run a query to Download Data