RE: grouping / sorting etc..

2003-07-14 Thread Christopher Knight
Thanks for everybody's help!! This way worked for me. Clever! Chris ... and yes... even my example was messed up :-P -Original Message- From: Rudy Metzger [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 4:15 AM To: Christopher Knight; MySQL List Subject: RE: grouping / so

Re: grouping / sorting etc..

2003-07-14 Thread Krasimir_Slaveykov
Hello Christopher, Friday, July 11, 2003, 6:31:33 PM, you wrote: First select: The results are just right what you want in your SELECT. You have 5 different values in COLUMN1 and your select returns them. >From second column SELECT gets first value for each value of first column. Second select:

RE: grouping / sorting etc..

2003-07-14 Thread Rudy Metzger
SELECT col1, IF(count(*)!=count(col2),NULL,'BAD') FROM table1 GROUP BY col1; This ONLY works EXACLTY for the case you submitted. Please note that your example is wrong (I think). 3 should also return NULL, shouldn't it? /rudy -Original Message- From: Christopher Knight [mailto:[EMA