jonestrinhDAO SOL
Updated 2023-01-04Copy 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
›
⌄
with total as (
select
date_trunc('day', block_timestamp) as dt,
program_name as name,
sum(amount) as amount
from solana.core.fact_gov_actions
where action = 'LOCK'
group by 1,2
union all
select
date_trunc('day', block_timestamp) as dt,
program_name as name,
(-1)*sum(amount) as amount
from solana.core.fact_gov_actions
where action = 'EXIT'
group by 1,2
)
select
dt,
name,
sum(amount) as net_lock
from total
where dt >= current_date - interval '6 month'
group by 1,2
Run a query to Download Data