flyingfish1. bSOL supply
Updated 2024-01-16
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
›
⌄
with
mint_actions AS (
SELECT
block_timestamp
, mint_amount AS amount
from solana.defi.fact_token_mint_actions
WHERE succeeded
AND event_type = 'mintTo'
AND mint = 'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1'
AND block_timestamp > '2022-05-01'
UNION all
SELECT
block_timestamp
, burn_amount * (-1) as amount
FROM solana.defi.fact_token_burn_actions
WHERE succeeded
AND mint = 'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1'
AND block_timestamp > '2022-05-01'
)
SELECT
date_trunc('week', block_timestamp) AS date
, sum(amount) / pow(10,9) AS net_amount
, sum(net_amount) over (ORDER BY date) AS supply
FROM mint_actions
GROUP BY 1
ORDER BY date
QueryRunArchived: QueryRun has been archived