That would filter out the records containing 141 before it did the group by

That would mean I could get a "group" that had 141 in it

> 4     3       141     1
> 9     3       142     1
> 10    3       143     1

So, here it would not event look at record 4, then it would return me a group that 
contains a Data1 value of 3, but I do not require that result because it's original 
group contains 141


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 11:58 AM
> To: Luc Foisy
> Cc: MYSQL-List (E-mail)
> Subject: Re: Query Question
> 
> 
>  :ID  Data1   Data2   Data3
>  :1   1       141     1
>  :2   5       140     1
>  :For my return I only want a single instance of "Data1", so 
> it will most likely need be GROUP BY Data1
>  :
>  :I would like those records to include the "group" that does 
> not contain a "Data2" value of 141
>  :
>  :There is also a WHERE clause on "Data3" = 1
>  :
>  :The return would include these values for Data1
>  :
>  :7
>  :5
>  :2
>  :4
>  :
> 
> Try this, if you haven't already
> 
> SELECT ID, Data1 FROM sm_table WHERE Data1 != 141 GROUP by Data1;
> 
> 
> 
> 

---------------------------------------------------------------------
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

Reply via email to