yasmin-n-d-r-htotal solll
Updated 2022-11-09Copy Reference Fork
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 outflow as(
select
case
when mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
when mint='Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
end as stablecoin,
sum(amount) as "total outflow"
from
solana.core.fact_transfers a
join solana.core.dim_labels b on a.TX_TO = b.address
WHERE (
address_name LIKE '%ftx%'
OR address_name LIKE '%alameda%'
)
AND block_timestamp > CURRENT_DATE - 30
GROUP BY stablecoin
),
inflow as(
select
case
when mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
when mint='Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
end as stablecoin,
sum(amount) as "total inflow"
from
solana.core.fact_transfers a
join solana.core.dim_labels b on a.TX_FROM = b.address
where
(
address_name LIKE '%ftx%'
OR address_name LIKE '%alameda%'
)
AND block_timestamp > CURRENT_DATE - 30
GROUP BY stablecoin
Run a query to Download Data