changement affichage leaderboard

This commit is contained in:
2026-03-27 11:20:01 +01:00
parent 60b656d394
commit d66337a158

View File

@@ -167,8 +167,8 @@ public class GestionnaireBDD {
String sql = "SELECT u.identifiant, MAX(p.score) AS score, p.date_partie, p.campagne_id, p.difficulte_id " + String sql = "SELECT u.identifiant, MAX(p.score) AS score, p.date_partie, p.campagne_id, p.difficulte_id " +
"FROM parties p " + "FROM parties p " +
"JOIN utilisateurs u ON p.utilisateur_id = u.id " + "JOIN utilisateurs u ON p.utilisateur_id = u.id " +
"GROUP BY p.campagne_id, p.difficulte_id " + "GROUP BY u.identifiant, p.campagne_id, p.difficulte_id " +
"ORDER BY p.campagne_id ASC, p.difficulte_id ASC"; "ORDER BY MAX(p.score) DESC";
List<Object[]> data = new ArrayList<>(); List<Object[]> data = new ArrayList<>();
try (Statement stmt = conn.createStatement(); try (Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql)) { ResultSet rs = stmt.executeQuery(sql)) {