cybergenlab[CEX Overview] Inflow & Outflows
Updated 2024-11-16
999
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
›
⌄
with deposits as (
select
date_trunc('day', eth.block_timestamp) as date,
dl.label,
eth.to_address as CEX_address,
sum(eth.amount_usd) as usd_amount
from ethereum.core.ez_native_transfers eth
join ethereum.core.dim_labels dl
on eth.to_address=dl.address
where dl.label_type='cex'
and dl.label_subtype='hot_wallet'
and eth.amount_usd > 1
and block_timestamp >= dateadd(month, -3, date_trunc('day',current_date()))
and block_timestamp < date_trunc('day', current_date())
group by 1,2,3
union all
select
date_trunc('day', erc.block_timestamp) as date,
dl.label,
erc.to_address as CEX_address,
sum(erc.amount_usd) as usd_amount
from ethereum.core.ez_token_transfers erc
join ethereum.core.dim_labels dl
on erc.to_address=dl.address
where dl.label_type='cex'
and dl.label_subtype='hot_wallet'
and erc.amount_usd > 1
and block_timestamp >= dateadd(month, -3, date_trunc('day',current_date()))
and block_timestamp < date_trunc('day', current_date())
group by 1,2,3
order by 1 desc
)
QueryRunArchived: QueryRun has been archived