Select MIN() & MAX()
In the documentation it mentions that Postgresql does not currently support
MIN() and MAX() in the select list, but only in the where clause... will
this be available in the next version of Postgresql and is there another way
to do this in the current version?
- Greg
Greg Krasnow
HNC Software Inc.
Financial Solutions Group
Senior Software Engineer
Email: gak@hnc.com
Direct Phone: 619.799.8341
Fax: 619.799.8036
On Wed, 12 Aug 1998, you wrote:
In the documentation it mentions that Postgresql does not currently support
MIN() and MAX() in the select list, but only in the where clause... will
this be available in the next version of Postgresql and is there another way
to do this in the current version?
I don't know what is written in the doc, but in practice
select MAX( Attr ) from Table;
select MIN( Attr ) from Table;
select AVG( Attr ) from Table;
etc.
works without problem for me (v.6.3.2)
- Greg
Greg Krasnow
HNC Software Inc.
Financial Solutions Group
Senior Software Engineer
Email: gak@hnc.com
Direct Phone: 619.799.8341
Fax: 619.799.8036
--
=====================================================
Dimitri KRAVTCHUK (dim) Sun Microsystems
Benchmark Engineer France
dimitri@France.Sun.COM
=====================================================
In the documentation it mentions that Postgresql does not currently support
MIN() and MAX() in the select list, but only in the where clause... will
this be available in the next version of Postgresql and is there another way
to do this in the current version?
But we do support them in the select list. Where does it say that?
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
I'm using this in a an application right now:
$result = pg_Exec($conn, "SELECT MAX(pos) FROM demogallery;");
and its been working fine for about 2-3 months...
On Wed, 12 Aug 1998, Krasnow, Greg wrote:
Show quoted text
In the documentation it mentions that Postgresql does not currently support
MIN() and MAX() in the select list, but only in the where clause... will
this be available in the next version of Postgresql and is there another way
to do this in the current version?- Greg
Greg Krasnow
HNC Software Inc.
Financial Solutions Group
Senior Software Engineer
Email: gak@hnc.com
Direct Phone: 619.799.8341
Fax: 619.799.8036