$ 0 0 Nest the aggregate in an OLAP function: SELECT customerid, MAX(purchasedate) - MIN(purchasedate), MAX(MAX(purchasedate)) OVER () - MAX(purchasedate) FROM tab GROUP BY 1 Dieter
Nest the aggregate in an OLAP function:
Dieter