HDKop10
Updated 2023-04-19Copy 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
›
⌄
with Inflowtable as (
select block_timestamp::date as date,
sum (amount) as Inflow_Volume
from solana.core.fact_transfers t1 join solana.core.dim_labels t2 on t1.tx_from = t2.address
where mint='Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
group by 1),
Outflowtable as (
select block_timestamp::date as date,
sum (amount) as Outflow_Volume
from solana.core.fact_transfers t1 join solana.core.dim_labels t2 on t1.tx_to = t2.address
where mint='Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
group by 1)
select t1.date,
Inflow_Volume,
Outflow_Volume*-1,
Inflow_Volume - Outflow_Volume as Net_Flow,
sum (Inflow_Volume) over (order by t1.date) as Total_Inflow_Volume,
sum (Outflow_Volume) over (order by t1.date) as Total_Outflow_Volume,
Total_Inflow_Volume - Total_Outflow_Volume as USDC_Market_Cap
from Inflowtable t1 inner join Outflowtable t2 on t1.date = t2.date
where t1.date >= CURRENT_DATE - 90
order by 1
Run a query to Download Data