Closed 1llu5ion closed 1 year ago
Hi @1llu5ion .
ROLLUP
is not supported at the moment, but you can add a custom support. Check the wiki.
You can define a custom ROLLUP
function:
func ROLLUP(expressions ...Expression) Expression {
return Func("ROLLUP", expressions...)
}
Which than can be used, in the queries, like any other jet function:
stmt := SELECT(
Inventory.Warehouse,
SUM(Inventory.Quantity),
).FROM(
Inventory,
).GROUP_BY(
ROLLUP(Inventory.Warehouse),
)
@go-jet Thank you for your feedback.
Hello, i want to use select statement like this
SELECT warehouse, SUM(quantity) FROM inventory GROUP BY ROLLUP (warehouse);
but i don't know how to do it in JET