shahdadi-9ptm8Ysolana 2
Updated 2022-11-17
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
›
⌄
with a as(select
date_trunc('hour',block_timestamp) date,
count(tx_id) transaction,
sum(fee)/pow(10,9) fee
from solana.core.fact_transactions
where block_timestamp >= CURRENT_DATE - 90
group by 1
),b as(
select RECORDED_HOUR,close
from solana.core.fact_token_prices_hourly where id='5426' and RECORDED_HOUR>= CURRENT_DATE - 90
),c as(
select
date,
close,
transaction,
fee ,
fee*close usd_fee
from a join b on a.date=b.RECORDED_HOUR
)
select
date_trunc('day',date) date,
avg(close) sol_price,
sum(transaction) transaction,
sum(fee) fee ,
sum(usd_fee) usd_fee
from c
group by 1
Run a query to Download Data