.list(catalog.effectiveDate))))
.groupBy(ord).having(price.amount.sum().gt(0l))
.orderBy(price.amount.sum().desc())
.select(ord.id, price.amount.sum(), item.count());
Customer c1 = new Customer();
Catalog c2 = new Catalog();
query().from(ord)
.join(ord.lineItems, item).join(item.product, product)
.from(catalog).join(catalog.prices, price).where(