Re: Problem with select statement for duplicate data

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problem with select statement for duplicate data
Date: 2010-12-25 15:21:44
Message-ID: if525t$ac0$1@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Machiel Richards wrote:
>> 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

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

That's what the error message says. It gives the solution in the report of
the problem.

--
Lew
Ceci n'est pas une pipe.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Lew 2010-12-25 15:27:47 Re: Migration from MySQL to PostgreSQL : Datatypes?
Previous Message thewhitelantern 2010-12-25 15:10:14 in PostgreSQL 9.0.2 / pgAdmin III - ERROR: relation "[table name]" already exists