mamad-5XN3k3$KLAY CEX 1
Updated 2024-11-03
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 pricet as (
select
HOUR::date as pdate,
avg(price) as prices
from kaia.price.ez_prices_hourly
where symbol = 'KLAY'
group by 1
)
select
'From CEX' as type,
PROJECT_NAME,
count(distinct tx_hash) as txs,
count(distinct TO_ADDRESS) as users,
sum(value) as amount,
sum(value * prices) as usd_amount
from kaia.core.fact_transactions
join kaia.core.dim_labels on FROM_ADDRESS = ADDRESS
left join pricet on BLOCK_TIMESTAMP::date = pdate::date
where LABEL_TYPE = 'cex'
and LABEL_SUBTYPE = 'hot_wallet'
and TX_SUCCEEDED = 'TRUE'
group by 1,2
union
select
'To CEX' as type,
PROJECT_NAME,
count(distinct tx_hash) as txs,
count(distinct FROM_ADDRESS) as users,
sum(value) as amount,
sum(value * prices) as usd_amount
from kaia.core.fact_transactions
join kaia.core.dim_labels on TO_ADDRESS = ADDRESS
left join pricet on BLOCK_TIMESTAMP::date = pdate::date
QueryRunArchived: QueryRun has been archived