mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-08 03:50:21 +00:00
just need to fix the map to clue function.
This commit is contained in:
1 parent
727555e70f
commit
ea836179d6
6 files changed
+124
-43
No files matched your search
@@ -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
|
||||
`);
|
||||
|
||||
Reference in new issue
Block a user