Ali3NUsed Gas Fees By Voting Power (AAVE Delegates Past 90 Days)
    Updated 2023-03-17
    select
    case when voting_power::numeric/1e18 < 100 then '< 100 Voting Power'
    when voting_power::numeric/1e18 >= 100 and voting_power::numeric/1e18 < 1000 then '100 - 1,000 Voting Power'
    when voting_power::numeric/1e18 >= 1000 and voting_power::numeric/1e18 < 10000 then '1,000 - 10,000 Voting Power'
    when voting_power::numeric/1e18 >= 10000 and voting_power::numeric/1e18 < 100000 then '10,000 - 100,000 Voting Power'
    else '> 100,000 Voting Power' end as type,
    sum (Tx_fee) as Gas_fee
    from ethereum.aave.ez_votes t1 join ethereum.core.fact_transactions t2 using (tx_hash)
    where block_Timestamp >= CURRENT_DATE - 90
    group by 1
    order by 2 desc
    Run a query to Download Data