HessishStream2 - remaining atom
    Updated 2023-05-11

    with t0 as (SELECT DISTINCT tx_id as allhash
    from osmosis.core.fact_msg_attributes
    where
    block_timestamp::date >= '2023-01-01' and
    ATTRIBUTE_KEY = 'stream_id'
    and ATTRIBUTE_VALUE = '1'),


    atom as

    (with dep_pen as (SELECT DISTINCT tx_id as hash
    from osmosis.core.fact_msg_attributes join t0
    on tx_id=allhash
    where
    block_timestamp::date >= '2023-05-01' and
    ATTRIBUTE_KEY = 'action'
    and ATTRIBUTE_VALUE in ('subscribe_pending','subscribe')),


    dep_pen_wallet as (SELECT DISTINCT ATTRIBUTE_VALUE as wallet, hash
    from osmosis.core.fact_msg_attributes join dep_pen
    on tx_id=hash
    where
    block_timestamp::date >= '2023-05-01' and
    ATTRIBUTE_KEY = 'owner'
    ),

    claim1 as (SELECT DISTINCT tx_id as tx
    from osmosis.core.fact_msg_attributes join t0 on tx_id=allhash
    where
    block_timestamp::date >= '2023-01-01' and
    ATTRIBUTE_KEY = '_contract_address'
    and ATTRIBUTE_VALUE = 'osmo10vsjh59l8mpncmsl9hggf6ryxpf0kne09qa9wtn8j6ar3mh2mdlsq9h7dh'),
    Run a query to Download Data