John_GaltQ22: GAMM Share Value
    Updated 2022-07-04
    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-01-01'
    and msg_type = 'pool_joined'
    and attribute_key = 'pool_id'
    and attribute_value = '1'
    ),

    joinfilter as (select
    distinct tx_id as tx
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-01-01'
    and msg_type = 'message'
    and attribute_key = 'action'
    and attribute_value = '/osmosis.gamm.v1beta1.MsgJoinPool'
    ),

    gamm_mint as (select
    distinct tx_id as tx,
    SPLIT_PART(attribute_value, 'gamm', 1) as ugamm_shares
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-01-01'
    and msg_type = 'coinbase'
    and attribute_key = 'amount'
    ),

    tokens_in as (select
    distinct tx_id as tx,
    SPLIT_PART(attribute_value, 'ibc', 1) as uatom,
    SPLIT_PART(attribute_value, ',', -1) as uosmo
    from osmosis.core.fact_msg_attributes
    where date(block_timestamp) > '2022-01-01'
    and msg_type = 'pool_joined'
    and attribute_key = 'tokens_in'