KaskoazulAddresses that voted Terra/Anchor/Mirror governance
    Updated 2022-02-15
    WITH TERRA_GOV AS(
    SELECT
    distinct gv.voter as Vote_address,
    gv.blockchain as Governance_Protocol,
    db.balance_usd,
    db.currency
    FROM
    terra.gov_vote gv
    INNER JOIN terra.daily_balances db
    ON db.address = gv.voter
    WHERE
    gv.block_timestamp >= CURRENT_DATE - 90
    AND db.date = CURRENT_DATE - 1
    AND db.balance > 0
    --AND db.balance_type = 'staked'
    AND db.currency = 'LUNA'
    ),

    ANCHOR_GOV AS(
    SELECT
    distinct m.msg_value:sender as Vote_address,
    CASE m.msg_value:contract
    WHEN 'terra1f32xyep306hhcxxxf7mlyh0ucggc00rm2s9da5' THEN 'anchor'
    WHEN 'terra1wh39swv7nq36pnefnupttm2nr96kz7jjddyt2x' THEN 'mirror'
    END AS Governance_Protocol,
    db.balance_usd,
    db.currency
    FROM
    terra.msgs m
    INNER JOIN terra.daily_balances db
    ON db.address = m.msg_value:sender
    WHERE
    m.block_timestamp >= CURRENT_DATE - 90
    AND db.date = CURRENT_DATE - 1
    AND db.balance > 0
    --AND db.balance_type = 'staked'
    Run a query to Download Data