piperLockdrops ... ASTRO claiming Phase 1 - Total
    Updated 2022-01-27
    /*
    Lockdrops Keep Fallin' On My Head

    Explain, in your own words, what a “lockdrop” is. Choose a metric for
    ASTRO tokens (price, circulating supply, amount sold vs. HODL) and
    display it visually over a time period of your choosing.
    */

    WITH total_claimable_astro_reward AS(
    SELECT
    date_trunc('day', block_timestamp) as date,
    --tx_id,
    --event_attributes:user_address AS claimer,
    SUM(event_attributes:amount) / POW(10, 6) AS all_token_claimed
    --event_attributes:amount AS amount
    --CASE
    --WHEN event_attributes:total_claimable_astro_reward IS NOT NULL THEN 'total_claimable_astro_reward'
    --WHEN event_attributes:auction_astro_reward IS NOT NULL THEN 'auction_astro_reward'
    --END AS event,
    --event_attributes AS message
    FROM
    terra.msg_events
    WHERE
    --tx_id = '865F3ED31C89068D230C0003CC535EDA29A32376493E401BE49B488BA5527381' AND
    (
    event_attributes:total_claimable_astro_reward IS NOT NULL
    --OR
    --event_attributes:auction_astro_reward IS NOT NULL
    )
    AND
    DATE(block_timestamp) >= '2021-12-14'
    AND
    tx_status = 'SUCCEEDED'
    AND
    event_type = 'from_contract'
    AND
    Run a query to Download Data