saeedmznSwap Fees - over time
Updated 2022-06-24
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
›
⌄
-- replace(fee,'uosmo','')::NUMERIC/1e6
with swaps_from as (
select
block_timestamp::date as date ,
count(DISTINCT trader) as num_traders ,
sum (replace(fee,'uosmo','')::NUMERIC/1e6) as fees ,
count (DISTINCT tx_id) as num_swaps
from osmosis.core.fact_swaps join osmosis.core.fact_transactions using (tx_id)
where FROM_CURRENCY = 'uosmo'
and FROM_AMOUNT>0
and TO_CURRENCY != 'uosmo'
and fee ilike '%uosmo%'
and TX_STATUS = 'SUCCEEDED'
group by 1
),
swaps_to as (
select block_timestamp::date as date ,
count(DISTINCT trader) as num_traders ,
sum (replace(fee,'uosmo','')::NUMERIC/1e6) as fees ,
count (DISTINCT tx_id) as num_swaps
from osmosis.core.fact_swaps join osmosis.core.fact_transactions using (tx_id)
where FROM_CURRENCY != 'uosmo'
and FROM_AMOUNT>0
and TO_CURRENCY = 'uosmo'
and fee ilike '%uosmo%'
and TX_STATUS = 'SUCCEEDED'
group by 1
),
other_swaps as (
select block_timestamp::date as date ,
count(DISTINCT trader) as num_traders ,
sum (replace(fee,'uosmo','')::NUMERIC/1e6) as fees ,
count (DISTINCT tx_id) as num_swaps
from osmosis.core.fact_swaps join osmosis.core.fact_transactions using (tx_id)
where FROM_CURRENCY != 'uosmo'
and FROM_AMOUNT>0
Run a query to Download Data