barbodDaily transactions count to CEXs(transferred stablecoins)
Updated 2022-12-10
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
›
⌄
select date_trunc(day,BLOCK_TIMESTAMP)::date as date,
ADDRESS_NAME,
case
when mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
when mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
when mint = '9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i' then 'UST'
when mint = 'H5kMHghGUKo4MnGEp4mpAMxveDwnRZ4hXeZMWfp5EzGF' then 'UXD'
when mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' then 'USDH'
when mint = 'Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS' then 'PAI'
when mint = 'AJ6EVZEePA5HAn58ZRbLCWX3MsK2BKrkT6bJYunuTU71' then 'NIRV'
when mint = 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6oc' then 'FRAX'
when mint = 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o' then 'DAI'
end as token, sum(amount) as toal_amount,
sum(toal_amount) over (partition by token order by date rows between unbounded preceding
and current row ) as cum_toal_amount,
count(tx_id) as transaction_count,
sum(transaction_count) over (partition by token order by date rows between unbounded preceding
and current row ) as cum_transaction_count
from solana.core.fact_transfers t,solana.core.dim_labels l
where t.TX_TO = l.address
and mint in ('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'-- usdt
,'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' --usdc
,'H5kMHghGUKo4MnGEp4mpAMxveDwnRZ4hXeZMWfp5EzGF' --UXD
,'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX'--USDH
,'Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS'--pai
,'AJ6EVZEePA5HAn58ZRbLCWX3MsK2BKrkT6bJYunuTU71' --nirv
,'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6oc'--frax
,'9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i' -- 'UST'
,'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o' -- 'DAI'
)
and LABEL_TYPE = 'cex'
AND BLOCK_TIMESTAMP::date >= '2022-10-01'
group by 1,2,3
order by 1
Run a query to Download Data