COUNT(DISTINCT) -- is this correct behaviour?

2001-06-19 Thread Michael Widenius
Hi! Thanks for the nice test case! Next time you have as nice a test case, please send it to [EMAIL PROTECTED] for fast treatment! > "tommie" == tommie <[EMAIL PROTECTED]> writes: tommie> count() gives 0 but count(distinct) gives 1. is this correct or tommie> a bug or is there something

Re: COUNT(DISTINCT) -- is this correct behaviour?

2001-06-16 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: > count() gives 0 but count(distinct) gives 1. is this correct or > a bug or is there something wrong with my SELECT? > > mysql> create table t1 (f1 int); > mysql> insert into t1 values (1); > mysql> create table t2 (f1 int,f2 int); > mysql> select t1.f1,count(t2.f2) fr

COUNT(DISTINCT) -- is this correct behaviour?

2001-06-16 Thread tommie
count() gives 0 but count(distinct) gives 1. is this correct or a bug or is there something wrong with my SELECT? mysql> create table t1 (f1 int); mysql> insert into t1 values (1); mysql> create table t2 (f1 int,f2 int); mysql> select t1.f1,count(t2.f2) from t1 -> left join t2 on t1.f1=t2.f