LittlerDataLCD proposals with options and voters per option
    Updated 2025-02-28
    -- forked from LCD proposals copy @ https://flipsidecrypto.xyz/edit/queries/0de97801-c7b7-40bd-864d-362bc3230725


    with lcd_proposals as (

    select
    tx_hash
    ,block_timestamp as post_date
    ,decoded_log:description as description
    ,decoded_log:proposalId as proposal_id
    ,decoded_log:proposer as proposer
    ,decoded_log:endBlock as endblock
    ,decoded_log:startBlock as startblock
    from polygon.core.ez_decoded_event_logs
    where 1 = 1
    and block_timestamp > '2022-05-01'
    and contract_address = '0xac1fdca2be645e3e06c7832613a78c72135da945' --lucidaoGovernor
    and topics[0] = '0x7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e0'
    --and tx_hash = '0x266f2594c400f80c7941810bab74e18440a054f0b8c897a97f0acd4dcf4ef065'
    ), votes as (
    select
    tx_hash
    ,block_timestamp
    ,origin_from_address as voter
    ,decoded_log:proposalId as proposal_id
    ,decoded_log:reason as reason --might be null
    ,decoded_log:support as option
    ,decoded_log:weight /1e18 as weight
    from polygon.core.ez_decoded_event_logs
    where 1=1
    and block_timestamp > '2022-05-01'
    and contract_address = '0xac1fdca2be645e3e06c7832613a78c72135da945'
    and topics[0] = '0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4'
    --and tx_hash = '0x691e050263432e8f88fd6e7e505c473d83dda217605c8fdd72dff2de4af1ab37'
    )
    Last run: 14 days ago
    DESCRIPTION
    PROPOSAL_ID
    OPTION
    SUM(WEIGHT)
    COUNT(DISTINCT VOTER)
    COUNT(VOTER)
    1
    184-[FLP#0017] - Onboarding Alessio Zenga as Altr Oracle (Watch Expert Category)
    73716640890696482028852270977227119120023540938531615272653044479135841175349
    1
    16829941.505754166
    2
    155-[FLP#0010] - Budget Allocation Proposal (January - April)
    11922982775869490885369238902794158901636291710960005631868354353206753719369
    0
    25896815.498516733
    3
    174-[FLP#0014] - Replenishing Gamma Farms rewards
    68891237741617372812683244076572599562873059839156499929508655185089413114417
    1
    71312644.60980711717
    4
    164-[FLP#0012] - Budget Allocation Proposal May 2023
    29061558122810730094722398874397121642461345928482028186697533774083891514926
    1
    85513555.94812771414
    5
    159-[FLP#0011] - 2nd Farming strategy - Quickswap Gamma
    52222624235309497965100766059463217011094914489953629416740395434807700669970
    2
    56882.62398374911
    6
    155-[FLP#0010] - Budget Allocation Proposal (January - April)
    11922982775869490885369238902794158901636291710960005631868354353206753719369
    1
    100040630.229192020
    7
    165-[FLP#0012-A] - Budget Allocation Proposal May 2023 Amend
    72755722835029022026183735247650460735948109400424678304496482116701356152336
    1
    85522936.61079031616
    8
    138-[FLP#0007] - Budget Allocation Proposal
    1852245337577862589638381666751076130733048443773875192617528808530922745112
    1
    124476958.9995823535
    9
    148-[FLP#0008] - Budget Allocation Proposal (November- January)
    24135951742460200997756654074832480416818351164683584303085873698605231959451
    1
    107507683.2734392727
    10
    165-[FLP#0012-A] - Budget Allocation Proposal May 2023 Amend
    72755722835029022026183735247650460735948109400424678304496482116701356152336
    0
    56882.62398374911
    11
    214-[FLP#0024] - Unlocking LCD Tokens for Single Staking Implementation and Liquidity Incentives
    23653777167738952677886051095047074319509560423907299506892482868944480753840
    1
    112102324.6673942727
    12
    159-[FLP#0011] - 2nd Farming strategy - Quickswap Gamma
    52222624235309497965100766059463217011094914489953629416740395434807700669970
    1
    84656472.53552981515
    13
    225-[FLP#0025] - Proposal by a Consortium of Third Party Investors led by AI Capital Cyprus LTD to Purchase and Acquire All Lucidao Tokens for Real World Asset Expansion
    51969660800203879660435490881929214873857956674819101620394063074620432943419
    1
    142908573.9547173939
    14
    136-[FLP#0006] - Farming incentives on QuickSwap
    68569293676134773579041994802425823515719169762681454327849705563353094103538
    1
    121267686.2760343939
    15
    178-[FLP#0015] - Budget Allocation Proposal June-July 2023
    7434260448286180282298274437994303237131185171337329858733274657166480346391
    1
    70170804.73625141414
    16
    164-[FLP#0012] - Budget Allocation Proposal May 2023
    29061558122810730094722398874397121642461345928482028186697533774083891514926
    0
    56882.62398374911
    17
    170-[FLP#0013] - Car & Car as an Oracle on Altr platform
    105544260106475732314752849901017749488222912140258303769801763177636478942719
    1
    83430533.50728011515
    18
    200-[FLP#0022] - Quickswap Liquidity Removal Proposal
    57824366560105451219603073839572503096414932116593036060139493754425961093046
    1
    90877574.71077831919
    19
    197-[FLP#0021] - Retrospective Budget Allocation Proposal October 2023
    97515896146266609188335074651033381458917845164110605973864196176352789886345
    2
    134.9672179811
    20
    197-[FLP#0021] - Retrospective Budget Allocation Proposal October 2023
    97515896146266609188335074651033381458917845164110605973864196176352789886345
    1
    74217302.98855361515
    27
    5KB
    25s