Various team event queries for rosters


Find teams that are at a UPA event in the rostering system

-- find all the teams at the club sectionals
select r.teamid,, t.tournamentid, from roster_tournament t, roster_team r where like '2009C%CLUB%SECTION%' and t.tournamentid = r.tournamentid; 
-- teams with > 27 players on roster
select r.teamid,, t.tournamentid,, p.lastname, p.status from roster_tournament t, roster_team r, roster_player p  where like '2009C%CLUB%SECTION%' and t.tournamentid = r.tournamentid and p.teamid = r.teamid and p.status != 'D' group by teamid having count(r.teamid) > 27;

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.