Oh, that's it.
Thank you all very much.
Otto
- Original Message -
From: "Frank Bax" <[EMAIL PROTECTED]>
To:
Sent: Sunday, December 11, 2005 2:23 AM
Subject: Re: [SQL] select count of distinct rows
At 07:53 PM 12/10/05, Havasvölgyi Ottó wrote:
I would like t
Yes, almost. I need the list of all different rows.
It's syntax error at the *.
ROW(*)
^
Otto
- Original Message -
From: "Jaime Casanova" <[EMAIL PROTECTED]>
To: "Havasvölgyi Ottó" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, December 11, 2005 2:16 AM
Subject: Re: select count of d
thing and should run faster.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jaime Casanova
Sent: Saturday, December 10, 2005 7:13 PM
To: Foster, Stephen
Cc: Havasvölgyi Ottó; pgsql-sql@postgresql.org
Subject: Re: [SQL] select count of distinct rows
On 12
At 07:53 PM 12/10/05, Havasvölgyi Ottó wrote:
I would like to select the count of distinct rows in a table.
SELECT COUNT(DISTINCT *) FROM mytable;
This does not work. How can I do it with Postgres?
select count(*) from (select distinct * from mytable) as x;
--
ROTECTED]>
To: "'Havasvölgyi Ottó'" <[EMAIL PROTECTED]>; "'Jaime Casanova'"
<[EMAIL PROTECTED]>
Cc:
Sent: Sunday, December 11, 2005 2:12 AM
Subject: Re: [SQL] select count of distinct rows
Well this should work but I tried it and it di
On 12/10/05, Havasvölgyi Ottó <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to select the count of distinct rows in a table.
>
> SELECT COUNT(DISTINCT *) FROM mytable;
>
> This does not work. How can I do it with Postgres?
>
> Thanks,
> Otto
>
I guess what you need is to know how many times a
On 12/10/05, Foster, Stephen <[EMAIL PROTECTED]> wrote:
> Well this should work but I tried it and it didn't.
>
> SELECT DISTINCT COUNT(*) FROM mytable;
>
No, it shouldn't work... actually is a non-sense, count will return
just one value so there is nothing to be distinct with...
--
regards,
Jaim
bject: Re: [SQL] select count of distinct rows
Hi,
Yes, I need to compare all fields. Well, in this case it does not. Is
this
impossible?
Thanks,
Otto
- Original Message -
From: "Jaime Casanova" <[EMAIL PROTECTED]>
To: "Havasvölgyi Ottó" <[EMAIL PROTECTE
:57 AM
Subject: Re: [SQL] select count of distinct rows
On 12/10/05, Havasvölgyi Ottó <[EMAIL PROTECTED]> wrote:
Hi,
I would like to select the count of distinct rows in a table.
SELECT COUNT(DISTINCT *) FROM mytable;
are really all the fields distincts? the table doesn't have
On 12/10/05, Havasvölgyi Ottó <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to select the count of distinct rows in a table.
>
> SELECT COUNT(DISTINCT *) FROM mytable;
>
are really all the fields distincts? the table doesn't have a pk?
> This does not work. How can I do it with Postgres?
>
>
Hi,
I
would like to select the count of distinct rows in a
table.
SELECT COUNT(DISTINCT *) FROM
mytable;
This does not work. How can I
do it with Postgres?
Thanks,
Otto
11 matches
Mail list logo