bachisolmad4
Updated 2022-11-14Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
select
date(block_timestamp) as day,
stake_pool_name as pool_name,
case when action like '%deposit%' then 'Inflow'
when action like '%withdraw%' then 'Outflow'
else null
end as flow_type,
round(sum(amount/1e9),2) as total_volume,
round(avg(amount/1e9),2) as avg_volume
from solana.core.fact_stake_pool_actions
where succeeded = 'TRUE'
and block_timestamp >= dateadd('week', -1, getdate())
and flow_type is not null
and amount > 0
group by day, pool_name, flow_type
order by day desc
Run a query to Download Data