freemartianUntitled Query
Updated 2022-07-30Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
select sum(abs(amount)) as collected_fee, avg(price) as p, collected_fee*p as fee_usd,
date_trunc('day', block_timestamp::date) as TIME,
count(distincttx_id) as sale_count, fee_usd/sale_count as average_daily_fee
from polygon.udm_events u
inner join ethereum.core.fact_hourly_token_prices pr on to_char(block_timestamp, 'yyyy-mm-dd HH24:00:00.000') = hour
where pr.symbol = 'WETH'
and event_name = 'transfer'
and event_type = 'erc20_transfer'
and to_address in ('0x5b3256965e7c3cf26e11fcaf296dfc8807c01073', '0x8de9c5a032463c561423387a9648c5c7bcc5bc90')
and u.symbol = 'WETH'
group by TIME
Run a query to Download Data