From: Robert Reed [mailto:[EMAIL PROTECTED]

> This seems like it should be easy, and I'd be happy
> for a simple reference to where in the manual or in
> Paul's book I can find the answer.  I am wanting to
> find basically the inverse of a SELECT DISTINCT
> operation.  I have a table with a column labled
> date_created.  I know that some records (about 30)
> were created at the exact same time (to the second) as
> another record.  I would like to find the records that
> have a date_created value equal to another record.  Is
> this possible in 3.23.54?
> 
> Thanks in advance

Try this:

SELECT date_created, COUNT(*) AS num 
FROM tablename 
GROUP BY date_created 
HAVING num > 1;

HTH!


-- 
Mike Johnson
Web Developer
Smarter Living, Inc.
phone (617) 886-5539

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to