John_GaltPrice & Vol: DAI - OSMO
Updated 2022-06-28
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
›
⌄
with poolfilter as (select
distinct tx_id,
date(block_timestamp) as date,
msg_index as index
from osmosis.core.fact_msg_attributes
where date(block_timestamp) > '2022-04-12'
--where date(block_timestamp) > DATEADD(month, -3, current_date) --use this later
and msg_type = 'token_swapped'
and attribute_key = 'pool_id'
and attribute_value = 674
),
addfilter as (select
SPLIT_PART(attribute_value, '/', 1) as address,
tx_id
from osmosis.core.fact_msg_attributes
where date(block_timestamp) > '2022-04-12'
and msg_type = 'tx'
and attribute_key = 'acc_seq'
),
join1 as (select date, address, poolfilter.tx_id
from poolfilter
inner join addfilter on poolfilter.tx_id = addfilter.tx_id
),
osmoin as (select --osmoin
SPLIT_PART(attribute_value, 'u', 1) / pow(10, 6) as osmo_in,
tx_id,
msg_index as index
from osmosis.core.fact_msg_attributes
where date(block_timestamp) > '2022-04-12'
and msg_type = 'token_swapped'
and attribute_key = 'tokens_in'
and CONTAINS(attribute_value, 'uosmo')
),
Run a query to Download Data