just need to fix the map to clue function.

This commit is contained in:
bobbert committed 2025-03-16 20:52:51 +00:00
1 parent 727555e70f
commit ea836179d6
6 files changed
+124 -43

No files matched your search

+6 -1
View File
@@ -81,13 +81,18 @@ export async function GET(request) {
const teamRankings = await query(`
SELECT
t.id,
COUNT(DISTINCT tc.clue_id) as cluesFound
COUNT(DISTINCT tc.clue_id) as cluesFound,
COUNT(DISTINCT u.id) as memberCount
FROM
teams t
LEFT JOIN
team_clues tc ON t.id = tc.team_id
LEFT JOIN
users u ON t.id = u.team_id
GROUP BY
t.id
HAVING
memberCount > 0
ORDER BY
cluesFound DESC
`);