Search Postgresql Archives

Re: count function alternative in postgres

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

 



junaid malik <junaidmalik14@xxxxxxxxx> writes:
> Is there any alternative of mysql function COUNT(DISTINCT expr,
> [expr...]) in postgres. We get error if we

The SQL-standard way to do that would be

select count(*) from (select distinct expr,expr,... from ...) as ss;

COUNT with multiple arguments is not anywhere in the standard.

			regards, tom lane

-- 
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