select first_value(max(x)) over (), y
from (select unique1 as x, ten+four as y from tenk1) ss
group by y;
- QUERY PLAN
--------------------------------
+ QUERY PLAN
+---------------------------------------------
WindowAgg
-> HashAggregate
+ Group Key: (tenk1.ten + tenk1.four)
-> Seq Scan on tenk1
-(3 rows)
+(4 rows)
-- test non-default frame specifications
SELECT four, ten,