Query editor
with token_prices_usd as (selectdate_trunc('day', minute) as day,contract_address,avg(price) as price_usdfrom prices.usdwhere contract_address in (0x471ece3750da237f93b8e339c536989b8978a438, -- CELO0x765de816845861e75a25fca122bb6898b8b1282a,0x0e2a3e05bc9a16f5292a6170456a710cb89c6f72,0xd8763cba276a3738e6de85b4b3bf5fded6d6ca73,0x2f25deb3848c207fc8e0c34035b3ba7fc157602b,0x456a3d042c0dbd3db53d5489e98dfb038553b0d0,0xe8537a3d056da446677b9e9d6c5db704eaab4787,0x8a567e2ae79ca692bd748ab832081c45de4041ea,0x73f93dcc49cb8a239e2032663e9475dd5ef29a08)and blockchain = 'celo'AND minute >= current_date - interval '{{days}}' daygroup by 1,2order by 1 desc),celo_price_usd as (selectdate_trunc('day', minute) as day,contract_address,avg(price) as price_usdfrom prices.usdwhere contract_address in (0x471ece3750da237f93b8e339c536989b8978a438)and blockchain = 'celo'AND minute >= current_date - interval '{{days}}' daygroup by 1,2order by 1 desc),token_prices_celo as (selectt.day,case when t.contract_address = 0x471ece3750da237f93b8e339c536989b8978a438 then null else t.contract_address end as contract_address,t.price_usd / c.price_usd as price_celofrom token_prices_usd tleft join celo_price_usd c on t.day = c.day),eth_price_usd AS (SELECTdate_trunc('hour', minute) AS day,AVG(price) as price_usdFROM prices.usdWHEREsymbol = 'WETH'and blockchain = 'ethereum'and minute >= current_date - interval '{{days}}' dayGROUP BY 1),price_celo_in_eth as (