RamaharInflow daily (native)
Updated 2022-10-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
›
⌄
With native_bridge as (
--ETH
select block_timestamp, origin_from_address, tx_hash, 'ETH' as symbol, amount_usd
from ethereum.core.ez_eth_transfers
where eth_to_address = lower('0x99c9fc46f92e8a1c0dec1b1747d010903e884be1')
UNION
--Other tokens
select block_timestamp, origin_from_address, tx_hash, symbol, amount_usd
from ethereum.core.ez_token_transfers
where to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1')
select
DATE(block_timestamp) as dayz,
symbol,
--sum(amount) as tokens_amount,
count(distinct origin_from_address) as bridgers,
count(distinct tx_hash) as txs,
sum(amount_usd) USD_amount,
sum(USD_amount) over (partition by symbol order by dayz asc rows between unbounded preceding and current row) as cumu_vol,
sum(txs) over (partition by symbol order by dayz asc rows between unbounded preceding and current row) as cumu_tx
from native_bridge
where dayz >= CURRENT_DATE - {{period}}
group by 1, 2
having USD_amount is not null AND symbol IN ('USDC', 'ETH', 'USDT', 'LUSD', 'DAI')
Run a query to Download Data