Modification de requête pour affichage différent
Bonjour,
J'ai actuellement cette requête qui fonctionne
Code:
1 2 3 4 5 6 7
| SELECT DISTINCT t1.id, t1.id_club_dom, e1.club AS club_dom, t1.id_club_ext, e2.club AS club_ext, t2.id_match, t2.journee, t2.prono, COUNT( * )
FROM proa_matchs AS t1
INNER JOIN proa_clubs AS e1 ON e1.id_club = t1.id_club_dom
INNER JOIN proa_clubs AS e2 ON e2.id_club = t1.id_club_ext
LEFT JOIN proa_pronostics AS t2 ON t1.id = t2.id_match
WHERE t2.journee = '24'
GROUP BY t2.id_match, t2.prono |
qui me renvoie ce résultat
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| id id_club_dom club_dom id_club_ext club_ext id_match journee prono COUNT(*)
162 11 Rennes 8 Saint-Quentin 162 24 13 2
162 11 Rennes 8 Saint-Quentin 162 24 31 1
162 11 Rennes 8 Saint-Quentin 162 24 32 1
163 13 Narbonne 6 Beauvais 163 24 13 2
163 13 Narbonne 6 Beauvais 163 24 23 1
163 13 Narbonne 6 Beauvais 163 24 31 1
164 1 Poitiers 7 Cannes 164 24 30 1
164 1 Poitiers 7 Cannes 164 24 31 3
165 2 Paris 3 Tours 165 24 30 1
165 2 Paris 3 Tours 165 24 31 2
165 2 Paris 3 Tours 165 24 32 1
166 5 Toulouse 9 Montpellier 166 24 30 1
166 5 Toulouse 9 Montpellier 166 24 31 3
167 14 Saint-Brieuc 12 Alès 167 24 03 1
167 14 Saint-Brieuc 12 Alès 167 24 13 2
167 14 Saint-Brieuc 12 Alès 167 24 30 1
168 10 Sète 4 Tourcoing 168 24 03 1
168 10 Sète 4 Tourcoing 168 24 13 2
168 10 Sète 4 Tourcoing 168 24 23 1 |
Je souhaiterais regrouper les données de manière à afficher une seule ligne par rencontre.
Comment dois-je réécrire ma requête svp ?