0xaimanAverage volume per transaction per address, Deposit vs Withdrawal
Updated 2023-03-08
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
33
34
35
36
›
⌄
(select *, case when a2 is not null then 'Average Deposit Volume per txn per address' end as note from (with dep as (with a as (select tx_hash
from ethereum.core.fact_event_logs
where contract_address='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' and
event_name='Deposit' and
ORIGIN_TO_ADDRESS = '0x3b968d2d299b895a5fcf3bba7a64ad0f566e6f88'),
c as (select origin_from_address as depositor, b.tx_hash, amount from ethereum.core.ez_eth_transfers b
inner join a on b.tx_hash=a.tx_hash)
select depositor, avg(amount) as avg_vol_per_deposit
from c
group by 1
),
wdr as (with a as (select tx_hash
from ethereum.core.fact_event_logs
where contract_address='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' and
event_name='Withdrawal' and
ORIGIN_TO_ADDRESS = '0x3b968d2d299b895a5fcf3bba7a64ad0f566e6f88'),
c as (select origin_from_address as depositor, b.tx_hash, amount from ethereum.core.ez_eth_transfers b
inner join a on b.tx_hash=a.tx_hash)
select depositor, avg(amount) as avg_vol_per_withdrawal
from c
group by 1
)
select avg(avg_vol_per_deposit) as a2
Run a query to Download Data