summaryrefslogtreecommitdiff
path: root/storage/views/Ancients/Best.gosql
blob: bd876587f9c8a0f9463d1a7f1dfaaddb75a220ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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