RE: select count distinct

2002-02-13 Thread Land, Christopher

The following may assist: (three-fifths down)

http://www.mysql.com/doc/G/r/Group_by_functions.html

Note that if you are using MySQL Version 3.22 (or earlier) or if you are
trying to follow ANSI SQL, you can't use expressions in GROUP BY or ORDER BY
clauses. You can work around this limitation by using an alias for the
expression: 

mysql> SELECT id,FLOOR(value/100) AS val FROM tbl_name
   GROUP BY id,val ORDER BY val;

C:

-Original Message-
From: Brian Warn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 4:31 PM
To: MySQL List
Subject: select count distinct


I'm stuck right now with using v. 3.22.32.  Yes, I know I need to
upgrade, but I can't for various reasons.  Anyway, I need to do a select
count(distinct column) from table query, but can't since this version
doesn't support it.  How can I do this?

Thanks,
Brian


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




select count distinct

2002-02-13 Thread Brian Warn

I'm stuck right now with using v. 3.22.32.  Yes, I know I need to
upgrade, but I can't for various reasons.  Anyway, I need to do a select
count(distinct column) from table query, but can't since this version
doesn't support it.  How can I do this?

Thanks,
Brian


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: select(count(distinct(status))

2001-04-06 Thread Peter Skipworth

It should work fine as printed...but you'll need mysql 3.23.xx

On Fri, 6
Apr 2001, Temeschinko, Michael wrote:

> 
> hi,
> 
> I need to make a select like above in the subject count distinct (I need the
> count of the different values of a coloumn)
> 
> Hope you guys won't let me die silly!
> :-)
> 
> greetings from germany
> Micha
> 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




select(count(distinct(status))

2001-04-06 Thread Temeschinko, Michael


hi,

I need to make a select like above in the subject count distinct (I need the
count of the different values of a coloumn)

Hope you guys won't let me die silly!
:-)

greetings from germany
Micha
-- 
A train station is a station where a train stops
But what the hell is a workstation?

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php