MLDZMNgno15
Updated 2022-09-30Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with tb1 as (
select
*
from Polygon.core.fact_event_logs
where ORIGIN_TO_ADDRESS='0xf715beb51ec8f63317d66f491e37e7bb048fcc2d' and ORIGIN_FUNCTION_SIGNATURE='0xbbbfa60c'
and EVENT_INPUTS:to='0x5b3256965e7c3cf26e11fcaf296dfc8807c01073'
)
select
BLOCK_TIMESTAMP::date as day,
count(distinct tx_hash) as paid_count,
sum(distinct RAW_AMOUNT/1e18) as paid_weth,
avg(distinct RAW_AMOUNT/1e18) as average_pay,
sum(paid_weth) over (order by day) as cum_paid
from polygon.core.fact_token_transfers
where to_address = '0x5b3256965e7c3cf26e11fcaf296dfc8807c01073'
and tx_hash in (select tx_hash from tb1)
group by 1
Run a query to Download Data