PapasotLuna burn
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
›
⌄
-- adapted SQL code from https://app.flipsidecrypto.com/dashboard/pleasure-to-burn-1xFfCo
-- credits to the original author, potmo
-- WITH BURNED AS(
SELECT TO_DATE(block_timestamp) AS date,
CAST(SUM (token_0_amount) AS INTEGER) AS "Luna burned",
CAST(SUM (token_0_amount_usd) AS INTEGER) AS "Luna burned_USD volume"
FROM terra.swaps
WHERE TO_DATE(block_timestamp) >= dateadd(day, -180, current_date())
AND offer_currency = 'LUNA'
AND tx_status = 'SUCCEEDED'
GROUP BY 1
ORDER BY 1 -- )
--SELECT * FROM BURNED
--WHERE "burned Luna" > 2.7e6
-- This gets the total supply from the balance table.
-- select
-- DATE,
-- sum(balance) as daily_supply
-- from terra.daily_balances
-- where date(date) >= current_date() - 60
-- and currency = 'UST'
-- and balance > 0
-- group by date
-- order by date
Run a query to Download Data