MySQL Forums
Forum List  »  Newbie

Re: Dupe count on complex query
Posted by: Phillip Ward
Date: March 18, 2024 02:18AM

"Select Distinct" is [almost] always a Red Flag for me, especially where multiple Joins are involved. The "need" for it almost always indicates incorrect join conditions or data structure that are not correctly normalised.
"Distinct" and "Group By" is definitely a No-No.

Without seeing your table structures and sample data, all I can suggest is breaking the query down and reconstructing it, adding back one table at a time until the "duplication" appears, then correct that.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
B R
March 17, 2024 10:25PM
Re: Dupe count on complex query
March 18, 2024 02:18AM
B R
March 18, 2024 12:04PM


Sorry, only registered users may post in this forum.

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.