Afonso_Diaz2023-06-11 10:01 PM
    Updated 2023-06-11
    with t as (
    select
    block_timestamp,
    'Near' as chain,
    tx_hash as vote_id,
    signer_id as voter
    from near.core.fact_actions_events_function_call
    where method_name = 'act_proposal'

    union all

    select
    block_timestamp,
    'Cosmos' as chain,
    tx_id as vote_id,
    voter
    from cosmos.core.fact_governance_votes
    where tx_succeeded = 1

    union all

    select
    block_timestamp,
    'Osmosis' as chain,
    tx_id as vote_id,
    voter
    from osmosis.core.fact_governance_votes
    where tx_succeeded = 1
    ),

    t2 as (
    select
    chain,
    voter,
    min(block_timestamp)::date as min_date
    from t
    Run a query to Download Data