0-MIDtotal volume copy
Updated 2023-08-24
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with tab1 as (
select BLOCK_TIMESTAMP::date as date
,sum(case when FROM_ADDRESS in('0x80c67432656d59144ceff962e8faf8926599bcf8','0xe4edb277e41dc89ab076a1f049f4a3efa700bce8','0xd9d74a29307cc6fc8bf424ee4217f1a587fbc8dc')then ETH_VALUE end) as "DEPOSIT VALUE"
,sum(case when TO_ADDRESS in('0x80c67432656d59144ceff962e8faf8926599bcf8','0xe4edb277e41dc89ab076a1f049f4a3efa700bce8','0xd9d74a29307cc6fc8bf424ee4217f1a587fbc8dc')then ETH_VALUE end) as "WITHDRAW VALUE"
,sum("DEPOSIT VALUE")over(order by date) as "TOTAL DEPOSIT VALUE"
,sum("WITHDRAW VALUE")over(order by date) as "TOTAL WITHDRAW VALUE"
from base.core.fact_transactions
where FROM_ADDRESS in('0x80c67432656d59144ceff962e8faf8926599bcf8','0xe4edb277e41dc89ab076a1f049f4a3efa700bce8','0xd9d74a29307cc6fc8bf424ee4217f1a587fbc8dc')
or TO_ADDRESS in('0x80c67432656d59144ceff962e8faf8926599bcf8','0xe4edb277e41dc89ab076a1f049f4a3efa700bce8','0xd9d74a29307cc6fc8bf424ee4217f1a587fbc8dc')
group by 1)
select
avg("DEPOSIT VALUE") as "AVG DEPOSIT VALUE"
,avg("WITHDRAW VALUE") as "AVG WITHDRAW VALUE"
from tab1
Run a query to Download Data