MySQL Forums :: Optimizer & Parser :: Join without duplicates

Advanced Search

Join without duplicates
Posted by: Jamie M ()
Date: November 28, 2011 11:22AM

I have the following three tables and wish to select the competitorName and competitorDescription just once along with all the scores for that competitor.

I have tried several different JOIN queries but the competitorName and competitorDescription are always duplicated based on the number of rows returned from the score table.

Any help would be greatly appreciated! Thanks.

score Table
id competitorId eventId eventScore
1 5 7 12
2 5 8 21
3 6 7 11
4 6 8 23

competitor Table
id competitorName competitorDescription
5 A company description of company
6 Another company description of another company

events Table
id eventName eventDescription
7 Pub Quiz Description of Pub Quiz
8 Snooker Description of Snooker

Options: ReplyQuote

Subject Views Written By Posted
Join without duplicates 3012 Jamie M 11/28/2011 11:22AM
Re: Join without duplicates 856 Jørgen Løland 11/28/2011 02:39PM
Re: Join without duplicates 1114 Jamie M 11/29/2011 04:19AM
Re: Join without duplicates 1328 Jørgen Løland 11/29/2011 02:58PM

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.