summaryrefslogtreecommitdiff
path: root/storage/views/Ancients/Best.gosql
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-05-22 20:06:56 +0200
committerewy <ewy0@protonmail.com>2026-05-22 20:06:56 +0200
commit094846c15f4148c166ac297e26a1248bab0ab5c7 (patch)
treed9f671bb0d34b5be52db62636278f5d3e5657283 /storage/views/Ancients/Best.gosql
parent3ea1ed1362984619b182c0ddf9a6b1dc7ba5bcd0 (diff)
add views, expand api, add windows opening thing overridemain
Diffstat (limited to 'storage/views/Ancients/Best.gosql')
-rw-r--r--storage/views/Ancients/Best.gosql18
1 files changed, 18 insertions, 0 deletions
diff --git a/storage/views/Ancients/Best.gosql b/storage/views/Ancients/Best.gosql
new file mode 100644
index 0000000..bd87658
--- /dev/null
+++ b/storage/views/Ancients/Best.gosql
@@ -0,0 +1,18 @@
+SELECT
+ AVG(ActIndex) + 1 AS Act,
+ Character,
+ Key,
+ Count(*) AS Amount,
+ Sum(Win) AS Wins,
+ Amount - Sum(Win) AS Losses,
+ ROUND(Wins / Amount, 2) as Winrate,
+FROM
+ AncientChoice
+WHERE
+ Chosen = TRUE,
+GROUP BY
+ Character,
+ Key,
+ ActName,
+ORDER BY
+ Wins \ No newline at end of file