Add event and fix counts. Add game type pie chart.

This commit is contained in:
iamBadgers
2024-05-24 14:02:23 -07:00
parent 1d28b90e76
commit 32f5a7a1af
3 changed files with 47 additions and 24 deletions

View File

@@ -36,8 +36,8 @@ app.post('/api/serverstats/gamestats', jsonParser, async (req, res) => {
'SUM(CASE WHEN status = "Complete" THEN 1 ELSE 0 END) as Complete, ' +
'SUM(CASE WHEN status = "Postponed" THEN 1 ELSE 0 END) as Postponed, ' +
'SUM(CASE WHEN status = "Pending" THEN 1 ELSE 0 END) as Pending, ' +
'SUM(event) as Events, ' +
'SUM(fix) as Fixes, ' +
'SUM(CASE WHEN event = "TRUE" THEN 1 ELSE 0 END) as Events, ' +
'SUM(CASE WHEN fix = "TRUE" THEN 1 ELSE 0 END) as Fixes, ' +
'SUM(payoutEB) as TotalEB, ' +
'SUM(payoutIP) as TotalIP, ' +
'SUM(payoutEB) / SUM(CASE WHEN status = "Complete" THEN 1 ELSE 0 END) as AverageEB, ' +