Query editor
WITH token_volume AS (SELECTproject,token_bought_address AS contract_address,SUM(amount_usd) AS total_volumeFROM dex.tradesWHERE token_bought_address IS NOT NULLGROUP BY project, token_bought_address),token_rank AS (SELECTproject,contract_address,total_volume,RANK() OVER (PARTITION BY project ORDER BY total_volume DESC) AS rank_on_dexFROM token_volume)SELECTproject,contract_address,total_volume,rank_on_dexFROM token_rankWHERE contract_address = 0x9D0d41Df4cA809dC16A9BFf646d3c6CbC4EbC707ORDER BY rank_on_dex;