winnie-fs2023-04-24 11:28 AM
    Updated 2023-04-24
    SELECT SYMBOL, NAME,
    LOGS.DECODED_LOG:gauge_addr::string as GAUGE_ADDR,
    LOGS.DECODED_LOG:time::string as VOTE_TIME,
    LOGS.DECODED_LOG:user::string as VOTE_ADDR,
    LOGS.DECODED_LOG:weight::int as VOTE_WEIGHT,
    WEEK(BLOCK_TIMESTAMP) as WEEK_NUMBER,
    DAYOFWEEK(LOGS.BLOCK_TIMESTAMP) as WEEK_DAY,
    LOGS.BLOCK_TIMESTAMP as BLOCK_TIMESTAMP,
    *
    FROM ethereum.core.ez_decoded_event_logs LOGS
    LEFT JOIN ethereum.core.dim_contracts CONTRACT
    ON CONTRACT.address = lower(LOGS.DECODED_LOG:gauge_addr::string)
    WHERE CONTRACT_ADDRESS = lower('0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB')
    AND EVENT_NAME = 'VoteForGauge'
    AND BLOCK_TIMESTAMP > '2023-02-01 00:00:00.000'
    -- AND BLOCK_TIMESTAMP > '2023-04-07 00:00:00.000'
    AND LOGS.DECODED_LOG:gauge_addr::string = lower('0x8605dc0c339a2e7e85eea043bd29d42da2c6d784')
    ORDER BY LOGS.BLOCK_TIMESTAMP ASC
    Run a query to Download Data