MahrooUntitled Query
Updated 2022-12-21Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
with outflow as (select date_trunc('week',BLOCK_TIMESTAMP)::date as date, sum(amount) as outflow_amount,sum(outflow_amount) over ( order by date ) as cum_outflow_amount
from solana.core.fact_transfers t,solana.core.dim_labels l
where t.TX_TO = l.address
and mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
group by 1),
inflow as (select date_trunc('week',BLOCK_TIMESTAMP)::date as date, sum(amount) as inflow_amount,sum(inflow_amount) over ( order by date ) as cum_inflow_amount
from solana.core.fact_transfers t,solana.core.dim_labels l
where t.TX_FROM = l.address
and mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
group by 1)
select sum(inflow_amount) as inflow_amounts, sum(outflow_amount) as outflow_amounts
from inflow a inner join outflow b on a.date=b.date
where a.date >= '2022-01-01'
Run a query to Download Data