yasmin-n-d-r-hfee asli
Updated 2023-04-01
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
34
35
36
›
⌄
WITH StarAtlas AS (
SELECT date_trunc('month', block_timestamp::date) AS month,
count(DISTINCT TX_ID) AS num_transactions_StarAtlas
FROM solana.core.fact_events
WHERE program_id='ATLocKpzDbTokxgvnLew3d7drZkEzLzDpzwgrgWKDbmc'
AND SUCCEEDED=1
GROUP BY month),
fees as (
select
date_trunc('month', block_timestamp) as date,
sum(fee / pow(10,9) * close) as fee_usd,
avg(fee / pow(10,9) * close)as avg_gas_fee,
sum(fee_usd) over (
order by
date
) as cum_gas_fee
FROM solana.core.fact_transactions
JOIN StarAtlas s ON block_timestamp :: date = s.month
left join solana.core.ez_token_prices_hourly prices
on date_trunc('hour',block_timestamp) = prices.recorded_hour
and prices.symbol = 'sol'
group by date
),
flowprice as (
select
date_trunc('month', timestamp) as day,
avg(price_usd) as price
from
flow.core.fact_prices
where
symbol = 'FLOW'
group by
1),
Run a query to Download Data