sunshine-juliaVoted Pools
    Updated 2022-07-18
    with votes_tx as (
    select
    concat('0x',SUBSTRING(tx_json:input, 291, 40)) as pool_contract,
    *
    from optimism.core.fact_transactions
    where to_address = '0x09236cff45047dbee6b921e00704bed6d6b8cf7e' and
    SUBSTRING(tx_json:input, 1, 10) = '0x7ac09bf7'
    )
    select
    pool_contract,
    count(distinct tx_hash) as votes
    from votes_tx
    group by pool_contract
    order by votes desc
    limit 5

    Run a query to Download Data