Open guille10k opened 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:
The first 8 users where able to make more than 3 teams
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:
The first 8 users where able to make more than 3 teams