Afonso_Diazosmosis-fees-13
Updated 2023-03-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with t as (
select
block_date::date as day,
sum(fees_usd) as fee_usd
from osmosis.core.fact_pool_fee_day
where fees_usd is not null
and day > current_date - interval '{{ months }} months'
group by 1
),
t2 as (
select
block_timestamp::date as day,
count(distinct tx_id) as swaps,
count(distinct trader) as swappers,
sum(swaps) over (order by day) as cumulative_swaps
from osmosis.core.fact_swaps
where block_timestamp > current_date - interval '{{ months }} months'
group by 1
order by 1
)
select * from t join t2 using(day) order by day
Run a query to Download Data