winnie-fsJupiter LFG Vote - voting activity over time copy copy copy
    Updated 2024-03-07
    -- forked from Jupiter LFG Vote - voting activity over time copy copy @ https://flipsidecrypto.xyz/edit/queries/6a004d0d-85f7-4c4a-83c7-67a43d79c519

    -- forked from marqu / Jupiter LFG Vote - voting activity over time copy @ https://flipsidecrypto.xyz/marqu/q/Ry0mf1_3II-Y/jupiter-lfg-vote---voting-activity-over-time-copy

    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