boomer77terra airdrop claim daily
    Updated 2021-11-11
    select
    date_trunc('day', block_timestamp) as block_day,
    event_attributes:"1_contract_address"::string as token_address,
    sum(event_attributes:"0_amount"/1e6) as amount_claimed, CASE
    when event_attributes:"1_contract_address"::string = 'terra12897djskt9rge8dtmm86w654g7kzckkd698608' then '$PSI'
    when event_attributes:"1_contract_address"::string = 'terra1nef5jf6c7js9x6gkntlehgywvjlpytm7pcgkn4' then '$LOOP'
    when event_attributes:"1_contract_address"::string = 'terra1kcthelkax4j9x8d3ny6sdag0qmxxynl3qtcrpy' then '$MINE'
    when event_attributes:"1_contract_address"::string = 'terra14z56l0fp2lsf86zy3hty2z47ezkhnthtr9yq76' then '$ANC'
    when event_attributes:"1_contract_address"::string = 'terra15gwkyepfc6xgca5t5zefzwy42uts8l2m4g40k6' then '$MIR'
    else '$STT' end as token
    from terra.msg_events
    where event_attributes:"0_action"::string = 'claim' and event_type = 'wasm' and tx_status = 'SUCCEEDED' and block_timestamp >= CURRENT_DATE - 90
    group by 1,2