jackguySolend Liquidation Battle
Updated 2022-07-07
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
›
⌄
WITH tab1 as (
SELECT
trunc(block_timestamp,'day') as date,
sum(1) as txs
from solana.core.fact_events
where event_type is not null
group by 1
), tab0 as (
SELECT *
FROM (VALUES
('Whale Liquidity', 184.29), ('Other Liquidity', 6.93)
)
), tab2 as (
SELECT
trunc(block_timestamp,'day') as date,
sum(1) as txs
from solana.core.fact_events
where event_type LIKE 'delegate'
group by 1
), tab3 as (
SELECT
tab2.date,
tab1.txs as total_txs,
sum(total_txs) over (order by tab1.date) as cum_txs,
tab2.txs as staked_txs,
sum(staked_txs) over (order by tab1.date) as cum_staked_txs,
(staked_txs/total_txs)*100 as pcg_staking_txs,
100-pcg_staking_txs as pcg_non_staking_txs
from tab1, tab2 where tab1.date = tab1.date
)
SELECT * from tab0
Run a query to Download Data