Re: COUNT(DISTINCT ...)

2003-03-12 Thread Paul DuBois
At 16:42 -0500 3/12/03, Bob Sawyer wrote: HELP! I'm getting the following error: -- Error (SQL): SELECT date, subject, location, private, id, duration, dategroup_id, COUNT(DISTINCT subject) AS appointment_count, inituserid FROM mgw_calendar WHERE userid=1 AND SUBSTRING(date,1,8) = '200

RE: count(distinct

2002-01-09 Thread Roger Baklund
COUNT(DISTINCT was introduced in 3.23.2: http://www.mysql.com/doc/N/e/News-3.23.2.html > -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list

RE: count(distinct

2002-01-09 Thread Land, Christopher
tion id is 19 to server version: 3.23.39-nt Xi2 -Original Message- From: Stephen Abshire [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 7:21 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: count(distinct I am inclined to think (actually guess) it may be the version o

Re: count(distinct

2002-01-09 Thread Stephen Abshire
required but I was unable to find anything. Original Message Follows From: Ilic <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Re: count(distinct Date: Wed, 9 Jan 2002 14:54:12 +0100 Il Tue, 08 Jan 2002 13:23:09 -0500, Stephen Abshire andava dicendo... >>SELECT count

RE: count(distinct

2002-01-09 Thread Roger Baklund
* Ilic > >>SELECT count(distinct ip) FROM pole_voti > >> > >>It does'nt work. Why ? > >> > >>PhpMyAdmin says: You have an error in your SQL syntax near > >>'distinct ip) FROM pole_voti' at line 1 > > >I don't have MySQL on the computer I am on to test this but you > >might try rewriting it this

RE: count(distinct

2002-01-09 Thread Land, Christopher
AM To: [EMAIL PROTECTED] Subject: Re: count(distinct Il Tue, 08 Jan 2002 13:23:09 -0500, Stephen Abshire andava dicendo... >>SELECT count(distinct ip) FROM pole_voti >> >>It does'nt work. Why ? >> >>PhpMyAdmin says: You have an error in your SQL syntax near >&g

Re: count(distinct

2002-01-09 Thread Ilic
Il Tue, 08 Jan 2002 13:23:09 -0500, Stephen Abshire andava dicendo... >>SELECT count(distinct ip) FROM pole_voti >> >>It does'nt work. Why ? >> >>PhpMyAdmin says: You have an error in your SQL syntax near >>'distinct ip) >>FROM pole_voti' at line 1 >I don't have MySQL on the computer I am on to

Re: count(distinct

2002-01-08 Thread Carl Troein
Ilic writes: > SELECT count(distinct ip) FROM pole_voti > > It does'nt work. Why ? What's your MySQL version? Check the docs to see what version is required for count(distinct). I think it was added in 3.23.early, so it might be time to upgrade. //C -- Carl Troein - CĂ­rdan / Istari-PixelMa

RE: count(distinct

2002-01-08 Thread Land, Christopher
The syntax is: SELECT DISTINCT http://www.mysql.com/doc/S/E/SELECT.html Xi2 -Original Message- From: Ilic [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 9:48 AM To: [EMAIL PROTECTED] Subject: count(distinct SELECT count(distinct ip) FROM pole_voti It does'nt work. Why ? P

Re: count(distinct

2002-01-08 Thread Stephen Abshire
I don't have MySQL on the computer I am on to test this but you might try rewriting it this way: select count(distinct(ip)) from pole_voit Original Message Follows From: Ilic <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: count(distinct Date: Tue, 8 Jan 2002 18:47:43 +0100 SELEC

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

Re: count distinct

2001-04-13 Thread Peter Pentchev
On Fri, Apr 13, 2001 at 12:37:40PM +0200, Z_da_eXTaZie wrote: > I can make this query: select a from table. > I can count it: select count(a) from table. > I can select it: select distinct a from table. > But how can i count it? > > select count(distinct a) from table doesn't works It works f

Re: COUNT(DISTINCT some_column)

2001-02-23 Thread Peter Skipworth
Oops...apologies...my mistake =) *blush* P On Fri, 23 Feb 2001, Fred van Engen wrote: > On Fri, Feb 23, 2001 at 08:13:20PM +0900, Sam Joseph wrote: > > > > however on the MySQL versions I currently have access to (3.22.32 & > > 3.22.34) I get this: > > > > mysql> select COUNT(DISTINCT SOME_C

Re: COUNT(DISTINCT some_column)

2001-02-23 Thread Fred van Engen
On Fri, Feb 23, 2001 at 08:13:20PM +0900, Sam Joseph wrote: > > however on the MySQL versions I currently have access to (3.22.32 & > 3.22.34) I get this: > > mysql> select COUNT(DISTINCT SOME_COLUMN) from SOME_TABLE; > ERROR 1064: You have an error in your SQL syntax near 'DISTINCT > SOME_COLUM

Re: COUNT(DISTINCT some_column)

2001-02-23 Thread Peter Skipworth
This feature isn't available in current versions of mySQL, but is on the TODO list. regards, P On Fri, 23 Feb 2001, Sam Joseph wrote: > Hi there, > > Doesn't seem to be a FAQ so here goes with a question > > My MySQL manual has the following to say about how to count the number > of distinc

RE: COUNT(DISTINCT )

2001-02-16 Thread Roger Ramirez
You can use: SELECT , count() FROM GROUP BY > -Original Message- > From: Franz, Fa. PostDirekt MA [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 16, 2001 3:02 AM > To: [EMAIL PROTECTED] > Subject: COUNT(DISTINCT ) > > > > Hi Everybody , > > I am using MySql 3.22.32 on LINUX. > My

RE: COUNT(DISTINCT )

2001-02-16 Thread Carsten H. Pedersen
COUNT(DISTINCT...) wasn't added until v. 3.23.02 / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq > Hi Everybody , > > I am using MySql 3.22.32 on LINUX. > My problem is , that 'SELECT COUNT(DISTINCT ) FROM > > doesn't work >