Group by Multiple columns with drizzle

I have a schema that looks rougly like this:
date | location | name | quantity


I want to groupBy multiple columns(date,location), but I'm not sure if there is a drizzle-way to do it, or should I do a raw query?

        const grouped = await d
            .select({
                location: marketGoods.location,
                                date: marketGoods.date
                quantitySum: sql<number>`sum(${marketGoods.quantity})`,                
            })
            .from(marketGoods)
///idk what to do here
            .groupBy(({ date }) => date)
            .groupBy(({ good }) => good);
Was this page helpful?