boomer77solana fees
Updated 2022-02-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with raw as (select *, fee/1e6 as fees_sol
from solana.transactions
where succeeded = 'TRUE' and block_timestamp >= '2022-01-01'),
sol_p as (select date_trunc('day', hour) as dt, avg(price) as sol_usd
from ethereum.token_prices_hourly
where symbol = 'SOL'
group by 1),
fees as (select date_trunc('day', block_timestamp) as dt, sum(fees_sol) as fees, avg(fees_sol) as average_fee
from raw
group by 1)
select a.dt, a.fees, b.sol_usd, a.average_fee, (a.fees*b.sol_usd) as fees_usd
from fees a
left outer join sol_p b on a.dt = b.dt
Run a query to Download Data