using rank() and window functions in Greenplum

The gadget spec URL could not be found
Define and name a window specification. Reuse window specification throughout the query
The gadget spec URL could not be found
sachi=# select region,rank() over (order by year) from sachi.sales;
 region | rank 
--------+------
 asia   |    1
 usa    |    2
(2 rows)

The gadget spec URL could not be found
                                                            ^
sachi=# select region, rank() over (W) from sachi.sales WINDOW W as (order by year);
 region | rank 
--------+------
 asia   |    1
 usa    |    2
(2 rows)

The gadget spec URL could not be found
The gadget spec URL could not be found

Comments