Query editor
-- Get S&P500 Pricewithbase as (select week, sum(eth) as eth, sum(btc) as btc, sum(sol) as sol from (select date_trunc('week',minute) as week,case when symbol='ETH' and contract_address is null then coalesce(avg(price),0) end as eth,case when symbol='BTC' and contract_address is null then coalesce(avg(price),0) end as btc,case when symbol='SOL' and contract_address is null then coalesce(avg(price),0) end as solfrom prices.usdwhere contract_address is null and symbol in ('ETH','BTC','SOL','BNB')and blockchain is nulland decimals is nullgroup by 1,symbol,contract_address)agroup by 1)select * from base where week >= date(now()- interval '3' year)