From: Gianvito Pio <pio.gianvito@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Min and max element of an array column
Date: Wed, 02 Sep 2009 12:58:08 +0200
Message-ID: <4A9E4FC0.1010908@gmail.com> (raw)
Hello,
is it possible to obtain the minimum and the maximum single element of
an array column?
Example:
[1, 2 ,5]
[3, -1, 6]
[9, 18,-4 ]
I'd just like to make a query that gives me the min (-4) and the max(18)
of the column. Is that possible without a function? Thanks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pio.gianvito@gmail.com
Subject: Re: Min and max element of an array column
In-Reply-To: <4A9E4FC0.1010908@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox