John_GaltRewards Claimed, Unique Addresses
    Updated 2022-07-07
    with claimed_rewards as (select ---prism
    date(block_timestamp) as date,
    event_attributes:prism_reward_claimed / pow(10, 6) as claimed,
    event_attributes:to as address
    from terra.msg_events
    where date(block_timestamp) > '2022-04-06'
    and event_attributes:claim_type = 'Prism'
    and event_attributes:"0_contract_address" = 'terra1ns5nsvtdxu53dwdthy3yxs6x3w2hf3fclhzllc'
    and event_attributes:"0_action" = 'claim_withdrawn_rewards'
    and event_index = 3
    union all
    select --xprism
    date(block_timestamp) as date,
    event_attributes:prism_reward_claimed / pow(10, 6) as claimed,
    event_attributes:"1_to" as address
    from terra.msg_events
    where date(block_timestamp) > '2022-04-06'
    and event_attributes:claim_type = 'Xprism'
    and event_attributes:"0_contract_address" = 'terra1ns5nsvtdxu53dwdthy3yxs6x3w2hf3fclhzllc'
    and event_attributes:"0_action" = 'claim_withdrawn_rewards'
    and event_index = 3
    union all
    select ---amps
    date(block_timestamp) as date,
    event_attributes:prism_reward_claimed / pow(10, 6) as claimed,
    event_attributes:user as address
    from terra.msg_events
    where date(block_timestamp) > '2022-04-06'
    and event_attributes:claim_type = 'Amps'
    and event_attributes:"0_contract_address" = 'terra1ns5nsvtdxu53dwdthy3yxs6x3w2hf3fclhzllc'
    and event_attributes:"0_action" = 'claim_withdrawn_rewards'
    and event_index = 3
    )

    select
    date,
    Run a query to Download Data