Moemaingas4
Updated 2022-11-16
999
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
›
⌄
(select
'Osmosis ' as chain ,date,
total_fee_usd,
fee_per_block
from
(select
block_timestamp::date date,
count(distinct BLOCK_ID) as block_count,
avg(price) * sum(gas_used/1e9) as total_fee_usd,
total_fee_usd/block_count as fee_per_block
from
osmosis.core.dim_prices
inner join osmosis.core.fact_transactions
on recorded_at::date=block_timestamp::date
where symbol ='OSMO' and tx_from is not null
and recorded_at::date >= current_date - 90
and block_timestamp::date >= current_date - 90
and tx_status='SUCCEEDED'
group by 1))
union all
(select
'Ethereum ' as chain ,date,
total_fee_usd,
fee_per_block
from (with
p as (select hour::date as date,
avg (price) as price
from ethereum.core.fact_hourly_token_prices
where symbol ilike 'wETH'
group by 1)
select
date_trunc('day', block_timestamp)::date as date ,
Run a query to Download Data