adriaparcerisasdau avax cex 3
Updated 2024-04-17
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
›
⌄
WITH
active_receivers as (
SELECT
trunc(x.block_timestamp,'week') as date,
--to_address,
symbol,
count(distinct origin_from_address) as n_users,
count(distinct x.tx_hash) as txs,
sum(amount_usd) as volume
from avalanche.core.ez_token_transfers x
where to_address in (select distinct address from avalanche.core.dim_labels where label_type='cex')
group by 1,2
),
active_senders as (
SELECT
trunc(x.block_timestamp,'week') as date,
--from_address,
symbol,
count(distinct origin_from_address) as n_users,
count(distinct x.tx_hash) as txs,
sum(amount_usd)as volume
from avalanche.core.ez_token_transfers x
where from_address in (select distinct address from avalanche.core.dim_labels where label_type='cex')
group by 1,2
),
active_users as (
SELECT
ifnull(x.date,y.date) as date,
ifnull(x.symbol,y.symbol) as symbol,
ifnull(x.n_users,0) as senders_to_cex,
ifnull(y.n_users,0) as receivers_from_cex,
senders_to_cex-receivers_from_cex as netflow_users_to_cex,
ifnull(x.txs,0) as sendings_to_cex,
ifnull(y.txs,0) as receivings_from_cex,
QueryRunArchived: QueryRun has been archived