SELECT and INNER JOIN
Im joining PredictionData to MisEquipos on the username. There are two rows in MisEquipos with the same username. For that reason every row in PredictionData are duplicated.
One set of results for equipo "A" and the other set for equipo "B".
How can be the SELECT without duplicate that.?
SELECT MisEquipos.equipo, PredictionData.homescore, PredictionData.awayscore FROM PredictionData INNER JOIN Campeonatos ON PredictionData.campeonatos = Campeonatos.campeonatosmainID INNER JOIN Divisions ON MisEquipos.campoalt = Divisions.equipoID INNER JOIN MisEquipos ON PredictionData.username = MisEquipos.username WHERE MisEquipos.campoalt = 76 order by MisEquipos.equipo, PredictionData.matchdate;
Thanks a lot
|