Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT c.ROWI AS contest_id, TEAMS.KIND AS kind,
- DENSE_RANK() OVER (PARTITION BY c.ROWI, TEAMS.KIND ORDER BY p.MARK DESC) AS res,
- TEAMS.ROWI AS team_id FROM CONTESTS c
- JOIN POINTS p, TEAMS ON p.CONTEST = c.ROWI AND p.TEAM = TEAMS.ROWI
- ORDER BY contest_id, kind, res, team_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement