John_GaltOsmosis LUNA LP - hmmm
    Updated 2022-06-11
    with poolfilter as (select
    distinct tx_id as tx,
    date(block_timestamp) as date
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-05-28'
    and (msg_type = 'pool_joined' or msg_type = 'pool_exited')
    and attribute_key = 'pool_id'
    and attribute_value = '726' --luna - osmo
    ),

    addenter as (select
    attribute_value as address,
    tx_id as tx
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-05-28'
    and msg_type = 'pool_joined'
    and attribute_key = 'sender'
    ),

    addexit as (select
    attribute_value as address,
    tx_id as tx
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-05-28'
    and msg_type = 'pool_exited'
    and attribute_key = 'sender'
    ),

    tokensin as (select
    attribute_value as amount,
    tx_id as tx
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-05-28'
    and msg_type = 'pool_joined'
    and attribute_key = 'tokens_in'
    ),
    Run a query to Download Data