vegardDaily Gains Network Transactions Number (Polygon Native)
Updated 2022-11-05
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
27
28
29
30
31
32
›
⌄
select
date_trunc('day', block_timestamp)::date as day,
count (distinct (tx_hash)) as txn_number,
count (distinct origin_from_address) as senders_num,
sum (event_inputs:value / pow(10,18)) as total_amount_usd,
avg (event_inputs:value / pow(10,18)) as average_amount_usd,
median (event_inputs:value / pow(10,18)) as median_amount_usd,
min (event_inputs:value / pow(10,18)) as min_amount_usd,
max (event_inputs:value / pow(10,18)) as max_amount_usd,
avg (average_amount_usd) over (order by day rows between 6 preceding and current row) as moving_avg_7_days,
avg (average_amount_usd) over (order by day rows between 29 preceding and current row) as moving_avg_30_days,
(txn_number / senders_num) as txn_per_user,
(total_amount_usd / senders_num) as volume_usd_per_user, sum (txn_number) over (order by day asc) as comulative_txn_number,
sum (senders_num) over (order by day asc) as comulative_senders_num,
sum (total_amount_usd) over (order by day asc) as comulative_total_amount_usd,
sum (average_amount_usd) over (order by day asc) as comulative_average_amount_usd,
sum (median_amount_usd) over (order by day asc) as comulative_median_amount_usd,
sum (min_amount_usd) over (order by day asc) as comulative_min_amount_usd,
sum (max_amount_usd) over (order by day asc) as comulative_max_amount_usd
from polygon.core.fact_event_logs
where (
origin_to_address = '0x65187fec6ecc4774c1f632c7503466d5b4353db1' or
origin_to_address = '0xd8d177efc926a18ee455da6f5f6a6cfcee5f8f58' or
origin_to_address = '0xf8a140db8b05bec52c7e86d0d40d72f8e54fe559'
)
and origin_function_signature = '0x9aa7c0e5'
and event_name = 'Transfer'
and origin_from_address = event_inputs:from
and contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
and tx_status = 'SUCCESS'
group by day
order by day asc
Run a query to Download Data