piperJupiter Governance - Votes over time copy
    Updated 18 hours ago
    with t0 as (
    select decoded_instruction:args:side::string as side
    , decoded_instruction:args:weight::int * power(10, -6) as weight
    , signers[0]::string as voter
    , value:pubkey::string AS proposal
    , value:name::string AS name
    , block_timestamp
    from solana.core.fact_decoded_instructions i
    , LATERAL FLATTEN(input => decoded_instruction:accounts)
    where block_timestamp >= '2025-02-26'
    and i.program_id in (
    'GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY'
    )
    and name = 'proposal'
    and proposal = '8DA1TFPjbyfJXmQMrqRcQCGheoordFZ2fWNd3zpEhj2k'
    and side is not null
    and weight is not null
    and event_type = 'setVote'
    qualify(
    row_number() over (partition by voter order by block_timestamp desc) = 1
    )
    )
    select
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Date",
    round(sum(weight)) as "Votes",
    count(1) as "Voters",
    sum("Votes") over (order by "Date" asc) as "Cumulative Votes",
    sum("Voters") over (order by "Date" asc) as "Cumulative Voters",
    from
    t0
    GROUP BY 1
    ORDER BY 1 ASC


    Last run: about 18 hours agoAuto-refreshes every 12 hours
    Date
    Votes
    Voters
    Cumulative Votes
    Cumulative Voters
    1
    2025-02-26 00:00:00.0001627740423412516277404234125
    2
    2025-02-27 00:00:00.0001527432575152831551729985653
    3
    2025-02-28 00:00:00.0005454092119080370058220104733
    4
    2025-03-01 00:00:00.0004025375514837410311975119570
    5
    2025-03-02 00:00:00.000426886509456453000625129026
    5
    300B
    2s