RE: DISTINCT AND NON DISTINCT #2

2001-06-26 Thread Chris Bolt

Your question has been answered already.
http://marc.theaimsgroup.com/?l=mysql&m=99348999221821&w=2

> Hi All,
> 
> I've been reading up on how to do joins on the mysql site.
> 
> Is there not an inverse function for DISTINCT, so that I can pull out
> duplicate data as opposed to DISTINCT data...or will I have to get this
> information by using joins?


-
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




DISTINCT AND NON DISTINCT #2

2001-06-26 Thread anna soobrattee

Hi All,

I've been reading up on how to do joins on the mysql site.

Is there not an inverse function for DISTINCT, so that I can pull out
duplicate data as opposed to DISTINCT data...or will I have to get this
information by using joins?

Thanks very much for your help.

Anna




Re: DISTINCT AND NON DISTINCT

2001-06-25 Thread Hannes Niedner

On 6/25/01 9:10 AM, "anna soobrattee" <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> I've been reading up on how to do joins on the mysql site.
> 
> Is there not an inverse function for DISTINCT, so that I can pull out
> duplicate data as opposed to DISTINCT data...or will I have to get this
> information by using joins?
> 
> Thanks very much for your help.
> 
> Anna
> 
> 

You could use 'group by' like so.
x = value that is either distinct or not distinct:

Select x, count(*) from table_where_x_is_in group by x having count(*)>1;


Hope that helps. (BTW, you can also combine fields, but they have to appear
in the 'select' and in the 'group by' part. More in the really good manual).

I hope that accomplishes what you wanted.

Hannes


-
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




DISTINCT AND NON DISTINCT

2001-06-25 Thread anna soobrattee

Hi All,

I've been reading up on how to do joins on the mysql site.

Is there not an inverse function for DISTINCT, so that I can pull out
duplicate data as opposed to DISTINCT data...or will I have to get this
information by using joins?

Thanks very much for your help.

Anna