MySQL Forums
Forum List  »  Newbie

DISTINCT query question
Posted by: Mike Royalty
Date: February 12, 2009 04:46PM

I have a set of queries that pulls from a list of downloads of various documents - other data is the date of the download, email addr, blah

query 1 gets the total number of downloads for a document by ID - say it finds 1800 recs found

another query pulls the DISTINCT emails for the downloads of that document - say it finds 1723

that indicates that there are 77 duplicates of one or more email addresses

I need to ferret out those duplicates along with the record that qualified the download in DISTINCT query. And I need to see the whole transaction record - preferably sorted by the doc ID, then the email such that they are all grouped together for easy inspection.

I'm not sure that makes any sense to anyone but me, and I'm not sure I understand it - and I have no idea how to go about doing this.

Can anyone point me in the right direction to accomplish this - I don't need you to write the query for me, just get me off this hump I'm stuck on please.

regards,
Mike



Edited 1 time(s). Last edit at 02/12/2009 04:47PM by Mike Royalty.

Options: ReplyQuote


Subject
Written By
Posted
DISTINCT query question
February 12, 2009 04:46PM
February 12, 2009 05:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.