staderPublic Sale
    Updated 2022-07-07
    with claim as (
    select
    msg_value:execute_msg:claim:stage as stage,
    round(sum(msg_value:execute_msg:claim:amount::float/pow(10,8)),2) as SD_claimed
    from terra.msgs
    where
    msg_value:contract::string in ('terra127679wwl2glzc4cv7zu6rsp7062xuw5dnlt993')
    and tx_status = 'SUCCEEDED'
    and msg_value:execute_msg:claim is not null
    and stage in (9,7,13,15)
    group by 1
    ),

    vesting as (
    select
    (case
    when stage = 9 then 'Coinlist option 1 extension'
    when stage = 7 then 'Coinlist option 1 month 1'
    when stage = 13 then 'Coinlist option 1 month 2'
    when stage = 15 then 'Coinlist option 2 month 1'
    end) as Vesting,
    SD_claimed,
    (case
    when stage = 9 then 1353.44
    when stage = 7 then 272362.22
    when stage = 13 then 271542.36
    when stage = 15 then 297172.18
    end) as Tokens_allocated,
    round((SD_claimed*100)/Tokens_allocated,2) as Percentage_claimed
    from claim
    where
    stage != 1
    )

    select * from vesting
    Run a query to Download Data