ShapeShiftCEX Flow FOX? copy
Updated 2024-07-10
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
›
⌄
-- forked from tolltalcrypto / CEX Flow FOX? @ https://flipsidecrypto.xyz/tolltalcrypto/q/zyk3vbrpE2j9/cex-flow-fox
-- forked from mo115 / CEX Flow ETH + ERC20 mpine @ https://flipsidecrypto.xyz/mo115/q/MqjTdlIhBYRT/cex-flow-eth-erc20-mpine
-- forked from MLDZMN / CEX Flow ETH + ERC20 mpine @ https://flipsidecrypto.xyz/MLDZMN/q/y7Lc8zKcZRqt/cex-flow-eth-erc20-mpine
--select top tokens based on transfer volume https://etherscan.io/tokens?sort=24h_volume_usd&order=desc
with
deposits as
(
SELECT
eth.block_timestamp::date as date,
dl.label,
eth.to_address as CEX_address,
--sum(eth.amount) as eth_amount,
sum(eth.amount_usd) as usd_amount
from
ethereum.core.ez_native_transfers eth
inner join
ethereum.core.dim_labels dl
on eth.to_address=dl.address
where 1=1
and dl.label_type='cex'
and dl.label_subtype='hot_wallet'
group by
date,
dl.label,
CEX_address
union all
SELECT
erc.block_timestamp::date as date,
dl.label,
erc.to_address as CEX_address,
QueryRunArchived: QueryRun has been archived