SalehGovernance Reaction to Terra-proposals
    Updated 2022-05-23
    select
    -- DISTINCT ATTRIBUTE_VALUE
    ATTRIBUTE_VALUE
    ,case
    when ATTRIBUTE_VALUE='218' then 'Signalling Proposal for Incentivized Canonical USDC pool'
    when ATTRIBUTE_VALUE='219' then 'Make Osmosis the Co-Lead Sponsor of Cosmoverse 2022'
    when ATTRIBUTE_VALUE='220' then 'Match PSTAKE External Incentives for Pools #648'
    when ATTRIBUTE_VALUE='221' then 'Semi-Automatic Incentive Adjustments for 05/08/2022'
    when ATTRIBUTE_VALUE='222' then 'Reallocate half of the Incentives on OSMO/UST (#560) to OSMO/USDC (#678)'
    when ATTRIBUTE_VALUE='223' then 'Reallocate half of the Incentives on OSMO/LUNA (#561) to OSMO/ETH (#704) & approve the pool for Osmosis incentives'
    when ATTRIBUTE_VALUE='224' then 'Reallocate half of the Incentives on LUNA/UST (#562) to OSMO/DAI (#674) & approve the pool for Osmosis incentives'
    when ATTRIBUTE_VALUE='225' then 'Use Hardfork to Accelerate Proposals #222, #223, and #224'
    when ATTRIBUTE_VALUE='226' then 'Add functionality to allow depooling of UST pools via emergency upgrade hard fork in proposal #225'
    end as proposal_name
    -- ,case ATTRIBUTE_VALUE ilike '%option%:1%' then 'Yes'
    -- when then
    -- end as vote_type
    ,count(DISTINCT tx_id) as votes
    ,datediff(HOUR,min(block_timestamp),max(block_timestamp)) as Duration_voting_hours
    from osmosis.core.fact_msg_attributes
    -- where block_timestamp::date='2022-05-08'
    -- and tx_id='43F4B52DA7ECAA7B20590483EE58D92D690BF562B3210E426AB31D5D2D116C05'
    -- where msg_type ilike '%submit_proposal%'
    where block_timestamp::date>='2022-05-08' and block_timestamp::date<='2022-05-13'
    and ATTRIBUTE_KEY ='proposal_id'
    and proposal_name is not null
    -- and ATTRIBUTE_VALUE=219
    group by 1,2
    order by 1
    Run a query to Download Data