Query editor
/*The main goal of this query is to determine the cumalitive votes per gauge per epoch/week.This is mainly for the folks who split their vote up with a single veNFT across multiplegauges. If not for this, tracking who voted for what would be very straight forward.So, here's the tricky part..I'd need to assign a 1 to 1 relationship between Theelements of _pooVote array(varbinary)and _weights array(varbinary) / 10000 (to determine the percentage) as prtand weight * prt =func:"vote"args:{tokenId:"26"_poolVote:["0x2071a39da7450d68e4f4902774203df208860da2" Gauge receiving 60%"0x984c4c9836cb005476d0590684049ebcc978291e" Gauge receiving 40%]_weights:["6,000" which represents 60% of "weight" (which is total voting pwer of "tokenId")"4,000"]}*/withget_now AS (SELECT MAX(block_time) bt FROM base.transactions WHERE block_time > NOW() - interval '30' day),all_pairs AS (SELECT"token0",e.symbol AS token0_symbol,"token1",f.symbol AS token1_symbol,-- fee,stable,pool as output_pairFROMaerodrome_base.PoolFactory_evt_PoolCreated AS pLEFT JOIN tokens.erc20 AS e ON e.contract_address = p."token0"LEFT JOIN tokens.erc20 AS f ON f.contract_address = p."token1"WHEREf.blockchain = 'base'AND e.blockchain = 'base'),pair_labels AS (SELECT-- if fee is 100 = stables,CASEWHEN stable = true THEN 'sAMM-' || token1_symbol || '/' || token0_symbolELSE 'vAMM-' || token1_symbol || '/' || token0_symbol