Query editor
WITH all_votes AS (SELECTvoter,pool,weight / 1e18 AS vote_weight, -- Adjust the weight based on the appropriate decimal precisionDATE_TRUNC('day', evt_block_time) AS vote_dayFROM aerodrome_base.Voter_evt_VotedUNIONSELECTvoter,pool,weight / 1e18 AS vote_weight, -- Adjust the weight based on the appropriate decimal precisionDATE_TRUNC('day', evt_block_time) AS vote_dayFROM aerodrome_base.Voter_evt_Abstained)SELECTvoter,SUM(vote_weight) AS total_vote_weight, -- Sum the vote weightsCOUNT(DISTINCT vote_day) AS epoch_count -- Count distinct epochsFROM all_votesWHERE pool = {{pool_address}} -- Filter by pool addressGROUP BYvoterORDER BYtotal_vote_weight DESC -- Order by total vote weight