guille10k / slalomStatsApp

0 stars 0 forks source link

Users making too many teams #102

Open guille10k opened 1 year ago

guille10k commented 1 year ago

The rule says 3 teams per user but... when I run this query: `SELECT Team.coach, COUNT(Team.id) AS teams, email, username, display_name

FROM Team LEFT JOIN LeagueAssociation la ON Team.id=la.team LEFT JOIN User ON Team.coach=User.id

WHERE la.league=@league_id AND is_complete=1

GROUP BY Team.coach

ORDER BY teams DESC;`

This is the result: Captura de Pantalla 2023-06-15 a las 13 40 35

The first 8 users where able to make more than 3 teams