Re: Group by with insensitive order - Mailing list pgsql-general

From Aram Fingal
Subject Re: Group by with insensitive order
Date
Msg-id E54B78F6-274B-4D5D-97E9-2A4498C195A3@multifactorial.com
Whole thread Raw
In response to Re: Group by with insensitive order  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> Easy way is something like
>
> SELECT LEAST(drug1, drug2), GREATEST(drug1, drug2), AVG(response)
> FROM data
> GROUP BY 1, 2
>
> though it'd be a PITA to scale that to more than 2 drugs.
>
>             regards, tom lane

Thanks, Tom and Hubert, who said the same thing.  For the foreseeable future, two drug combos are all we're going to be
doing. That's bad enough with over 8000 combos of two.  

-Aram

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to fire triggers just on "top" level DML
Next
From: "Kevin Grittner"
Date:
Subject: Re: How to fire triggers just on "top" level DML