Skip site navigation (1) Skip section navigation (2)

Re: Problem with select statement for duplicate data

From: Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
To: Machiel Richards <machielr(at)rdc(dot)co(dot)za>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>,pgsql-novice-owner(at)postgresql(dot)org
Subject: Re: Problem with select statement for duplicate data
Date: 2010-12-21 09:57:00
Message-ID: OF47ABC1F9.9EFFA5CE-ON65257800.0036790A-65257800.0036A86A@ibsplc.com (view raw or flat)
Thread:
Lists: pgsql-novice
>                 select column1,column2,column3,count() from table 
> group by column1,column2,column3 having count() > 1;
> 
>         This however gives me the following error:
> 
>                 ERROR: count(*) must be used to call a parameterless
> aggregate function

Shouldn't it be count(*)? 
select column1,column2,column3,count(*).......having count(*) > 1

Regards,
Jayadevan






DISCLAIMER: 

"The information in this e-mail and any attachment is intended only for 
the person to whom it is addressed and may contain confidential and/or 
privileged material. If you have received this e-mail in error, kindly 
contact the sender and destroy all copies of the original communication. 
IBS makes no warranty, express or implied, nor guarantees the accuracy, 
adequacy or completeness of the information contained in this email or any 
attachment and is not liable for any errors, defects, omissions, viruses 
or for resultant loss or damage, if any, direct or indirect."






In response to

Responses

pgsql-novice by date

Next:From: Lukasz BrodziakDate: 2010-12-21 12:22:49
Subject: Re: Problem with select statement for duplicate data
Previous:From: Machiel RichardsDate: 2010-12-21 09:35:36
Subject: Problem with select statement for duplicate data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group