John_GaltCRO/OSMO: Activity
Updated 2023-04-18
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
›
⌄
with poolfilter as (select
distinct tx_id
from osmosis.core.fact_msg_attributes
where date(block_timestamp) > DATEADD(month, -3, current_date)
and msg_type = 'token_swapped'
and attribute_key = 'pool_id'
and attribute_value = 9
),
addfilter as (select
date(block_timestamp) as date,
SPLIT_PART(attribute_value, '/', 1) as address,
o.tx_id
from osmosis.core.fact_msg_attributes as o
inner join poolfilter on o.tx_id = poolfilter.tx_id
where date(block_timestamp) > DATEADD(month, -3, current_date)
and msg_type = 'tx'
and attribute_key = 'acc_seq'
),
final1 as (select
date, count(address) as total_swaps, COUNT(DISTINCT address) as unique_addr
from addfilter
where date < current_date
group by date
order by date
)
select * from final1
Run a query to Download Data