strawbettyUntitled Query
Updated 2022-06-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
with matic_price as (select
date_trunc(day, hour) as date,
avg(price) as price
from ethereum_core.fact_hourly_token_prices
where token_address = '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0' and date::date >= '2022-01-01'
group by date
)
select date,
sum(event_inputs:amount/pow(10,18)) as amount_matic,
price*amount_matic as total_usd,
count(tx_hash) as trancsaction_count,
price
from ethereum_core.fact_event_logs join matic_price on block_timestamp::date = date
where
event_name = 'TransferSentToL2' and contract_address = lower('0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2') and block_timestamp::date >= '2022-01-01'
group by date, price
Run a query to Download Data