Search Postgresql Archives

Re: Group by with insensitive order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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
-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux