brian-terrainternal-amaranth
Updated 2024-08-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
32
33
›
⌄
with PriceTb as (
SELECT
hour :: date as p_date,
avg(price) as price
FROM
solana.price.ez_prices_hourly
WHERE
token_address = '4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTy'
--AND p_date > '2024-01-01'
GROUP BY
1
), tab2 as (
SELECT
x.block_timestamp,
x.tx_id,
BURN_AUTHORITY as signer,
burn_amount / power(10, 9) as Honey_burn_amount,
(price * burn_amount) / power(10, 9) as Honey_burn_usd
FROM
solana.defi.fact_token_burn_actions as x
LEFT OUTER JOIN PriceTb on p_date = DATE_TRUNC('day', x.block_timestamp)
WHERE
mint LIKE '4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTy'
and x.block_timestamp > '2023-01-01'
AND SUCCEEDED
)
SELECT
--*
count(*) as amnt --count(DISTINCT tx_id) as events,
--count(DISTINCT signer) as users,
--sum(Honey_burn_amount) as burn_amount
FROM
tab2
QueryRunArchived: QueryRun has been archived