Updated 2022-12-19
    -- select x.user from
    -- (select
    -- block_timestamp,
    -- tx_id,
    -- msg_type,
    -- try_base64_decode_string(msg:attributes[0]:value) as user,
    -- split(try_base64_decode_string(msg:attributes[1]:value),'uatom')[0]::string as amt,
    -- split(try_base64_decode_string(msg:attributes[1]:value),'u')[1] as token
    -- from cosmos.core.fact_msgs
    -- where true
    -- and msg_type in ('coin_spent','coin_received')
    -- and split(try_base64_decode_string(msg:attributes[1]:value),'u')[1] = 'atom') as x
    -- where x.user in (select distinct(account_address) from cosmos.core.fact_validators)
    -- select distinct(address) from cosmos.core.fact_validators

    -- select x.user_from from
    -- (select
    -- m.block_timestamp,
    -- m.tx_id,
    -- msg_type,
    -- tx_from as user_from,
    -- split(try_base64_decode_string(msg:attributes[1]:value),'uatom')[0]::string as amt,
    -- split(try_base64_decode_string(msg:attributes[1]:value),'u')[1] as token
    -- from cosmos.core.fact_msgs m join cosmos.core.fact_transactions t on m.tx_id=t.tx_id
    -- where msg_type = 'unbond') as x
    -- where x.user_from in (select distinct(account_address) from cosmos.core.fact_validators)

    -- select * from cosmos.core.fact_validators limit 10;
    -- select * from cosmos.core.fact_transfers limit 10;
    -- select * from cosmos.core.fact_transactions limit 10;

    -- select receiver from cosmos.core.fact_transfers
    -- where receiver in (select distinct(address) from cosmos.core.fact_validators)

    Run a query to Download Data