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

Re: Distinct oddity

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Maximilian Tyrtania <maximilian(dot)tyrtania(at)onlinehome(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Distinct oddity
Date: 2009-05-07 18:54:09
Message-ID: dcc563d10905071154j613847edqc5cab8c8af68d496@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Thu, May 7, 2009 at 2:21 AM, Maximilian Tyrtania
<maximilian(dot)tyrtania(at)onlinehome(dot)de> wrote:
> Hi there,
>
> does this look right?
>
> FAKDB=# select count(distinct(f.land)) from firmen f where
> f.typlist='Redaktion';
>  count
> -------
>  1975
> (1 row)
>
> FAKDB=# select count(distinct(f.land||'1')) from firmen f where
> f.typlist='Redaktion';
>  count
> -------
>  4944
> (1 row)

Yeah, that does seem odd.  Could it be something like nulls in your
data set?  just guessing really.  If you could make a small test case
that shows it happening and allows others to reproduce it you're
likely to get more bites.

In response to

Responses

pgsql-sql by date

Next:From: Craig RingerDate: 2009-05-08 05:26:14
Subject: select regexp_matches('a a a', '([a-z]) a','g');
Previous:From: Marc MaminDate: 2009-05-07 14:51:31
Subject: select regexp_matches('a a a', '([a-z]) a','g');

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