Tom Smith schrieb am 03.09.2015 um 14:11:
>> 
>>     SELECT first_value(col1) over (order by col1),
>>            last_value(col1)  over (order by col1)
>>     FROM table;
>> 

> The window function works for me (with adding limit 1 in the end to output 
> only one row
> needed instead of many duplicate rows).


If that works for you with a LIMIT 1, then I don't understand why 

   select min(col1), max(col1) 
   from table

doesn't work for you



 



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to