Query editor
with cake_price as (select dt, symbol, pricefrom (select a.*, row_number() over (partition by symbol, dt order by minute desc) as rnfrom (select date_trunc('day', minute) as dt, symbol, price, minutefrom prices.usdwhere minute >= cast(timestamp '{{start_date}}' as date)and (blockchain = 'bnb' and symbol = 'CAKE')) a) bwhere rn = 1), uni_price as (select dt, symbol, pricefrom (select a.*, row_number() over (partition by symbol, dt order by minute desc) as rnfrom (select date_trunc('day', minute) as dt, symbol, price, minutefrom prices.usdwhere minute >= cast(timestamp '{{start_date}}' as date)and (blockchain = 'ethereum' and symbol = 'UNI')) a) bwhere rn = 1), sushi_price as (select dt, symbol, pricefrom (select a.*, row_number() over (partition by symbol, dt order by minute desc) as rnfrom (select date_trunc('day', minute) as dt, symbol, price, minutefrom prices.usdwhere minute >= cast(timestamp '{{start_date}}' as date)and (blockchain = 'ethereum' and symbol = 'SUSHI')) a) bwhere rn = 1), joe_price as (select dt, symbol, pricefrom (select a.*, row_number() over (partition by symbol, dt order by minute desc) as rnfrom (select date_trunc('day', minute) as dt, symbol, price