Title
#users-market-data
j

javier ramirez

09/05/2022, 5:18 PM
Since it works with a single condition, you could do the join with your conditions before, then update using a single column. Something like this
WITH q AS (
  SELECT ticker, timestamp
  FROM aggs 
  LATEST ON timestamp 
  PARTITION BY ticker
), q_url AS (
  select q.* from q join urls on(ticker)
  WHERE `timestamp` <= end
)
UPDATE urls u
SET done = true
FROM q_url
where u.ticker = q_url.ticker;