select block_timestamp::date as date,
case when tx_fee < 0.001 then 'Less Than 0.0001 ETH'
when tx_fee >= 0.001 and tx_fee < 0.002 then '0.001 - 0.002 ETH'
when tx_fee >= 0.002 and tx_fee < 0.003 then '0.002 - 0.003 ETH'
when tx_fee >= 0.003 and tx_fee < 0.004 then '0.003 - 0.004 ETH'
when tx_fee >= 0.004 and tx_fee < 0.005 then '0.004 - 0.005 ETH'
else 'More Than 0.005 ETH' end as type,
count (Distinct tx_hash) as Votes_Count
from ethereum.aave.ez_votes t1 join ethereum.core.fact_transactions t2 using (tx_hash)
where block_timestamp >= CURRENT_DATE - 180
group by 1,2