I am very new to drizzle so I'm not sure the best way to do this. I want to create a query, and then query from it and add some calculated fields. This is a rough example:
const first = db .select({ ...getTableColumns(recipe), likeCount: sql<number>
The problem is I don't know how to add more columns in my second select (const test = await db.select...). There are columns from my first query I want to do some calculations on. I am using Postgres.