Updating with a subquery

Can I do this in Drizzle without the raw SQL?

  db.execute(sql`
      UPDATE feeds AS f
        SET "lastPublishedAt" = (
          SELECT MAX(fi."publishedAt")
          FROM "feedItems" AS fi
          WHERE fi."feedId" = f.id
        );`);
Was this page helpful?