Query editor
with pepe2price as ( SELECT date_trunc('hour', block_time) as time, sum(amount_usd) / sum(token_bought_amount) as pepe2_priceFROM dex.tradeswhere token_bought_address = 0xfb66321d7c674995dfcc2cb67a30bc978dc862ad --PEPE2.0GROUP BY 1),doge2price as ( SELECT date_trunc('hour', block_time) as time, sum(amount_usd) / sum(token_bought_amount) as doge2_priceFROM dex.tradeswhere token_bought_address = 0xF2ec4a773ef90c58d98ea734c0eBDB538519b988 -- DOGE2.0GROUP BY 1),shib2price as ( SELECT date_trunc('hour', block_time) as time, sum(amount_usd) / sum(token_bought_amount) as shib2_priceFROM dex.tradeswhere token_bought_address = 0xdfef6416ea3e6ce587ed42aa7cb2e586362cbbfa -- SHIB2.0GROUP BY 1),floki2price as ( SELECT date_trunc('hour', block_time) as time, sum(amount_usd) / sum(token_bought_amount) as floki2_priceFROM dex.tradeswhere token_bought_address = 0xf76018c130663f907f4bfaa04999888f25b57099 -- FLOKI2.0GROUP BY 1),simpson2price as ( SELECT date_trunc('hour', block_time) as time, sum(amount_usd) / sum(token_bought_amount) as simpson2_priceFROM dex.tradeswhere token_bought_address = 0x5c559f3ee9a81da83e069c0093471cb05d84052a -- SIMPSON2.0GROUP BY 1),babydoge2price as ( SELECT date_trunc('hour', block_time) as time, sum(amount_usd) / sum(token_bought_amount) as babydoge2_priceFROM dex.tradeswhere token_bought_address = 0xa4E068e2B8f58E6c3090174a9E4E95F5bB025CA4 -- BABYDOGE2.0GROUP BY 1)select a.time , pepe2_price , doge2_price , shib2_price, floki2_price, simpson2_price, babydoge2_pricefrom pepe2price aleft join doge2price b on b.time = a.timeleft join shib2price c on c.time = a.timeleft join floki2price d on d.time = a.timeleft join simpson2price e on e.time = a.timeleft join babydoge2price f on f.time = a.time