winnie-fs2024-03-07 05:50 PM copy
    Updated 2024-03-08
    -- forked from 2024-03-07 05:50 PM @ https://flipsidecrypto.xyz/edit/queries/94a5ede5-264d-45e7-88c2-1d7218fe481c

    with

    vote_txs as (

    select
    block_timestamp
    , tx_id
    , signers[0] as voter_address
    , decoded_instruction :args :weight / pow(10, 6) as jup
    from solana.core.fact_decoded_instructions
    where program_id = 'GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY'
    and event_type = 'setVote'
    and decoded_instruction :accounts[1] :pubkey ::string = '6txWyf3guJrhnNJXcAHxnV2oVxBcvebuSbfYsgB3yUKc' -- Round #1 of LFG Voting!
    and block_timestamp > '2024-03-07'
    qualify row_number() over (partition by voter_address order by block_timestamp desc) = 1
    )

    select

    sum(jup) as jup
    , count(1) as voters

    from vote_txs



    QueryRunArchived: QueryRun has been archived