John_GaltPrice & Vol: DAI - OSMO
    Updated 2022-06-28
    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