home / season_28_matches

ports_towers (view)

22 rows

✎ View and edit SQL

This data as json, CSV (advanced)

Tower Games Wins Losses Winrate Pickrate Winrate_LowerBound_95CI
Alchemist 839 490 349 58.40% 13.18% 55.07%
MonkeyAce 1338 760 578 56.80% 21.02% 54.15%
MonkeySub 1004 557 447 55.48% 15.77% 52.40%
BananaFarm 1007 520 487 51.64% 15.82% 48.55%
MortarMonkey 196 106 90 54.08% 3.08% 47.10%
SniperMonkey 246 121 125 49.19% 3.86% 42.94%
HeliPilot 215 106 109 49.30% 3.38% 42.62%
SpikeFactory 176 75 101 42.61% 2.76% 35.31%
DartMonkey 118 50 68 42.37% 1.85% 33.46%
Druid 72 32 40 44.44% 1.13% 32.97%
WizardMonkey 216 78 138 36.11% 3.39% 29.71%
BombShooter 85 32 53 37.65% 1.34% 27.35%
EngineerMonkey 78 29 49 37.18% 1.23% 26.45%
NinjaMonkey 90 31 59 34.44% 1.41% 24.63%
TackShooter 111 35 76 31.53% 1.74% 22.89%
GlueGunner 87 28 59 32.18% 1.37% 22.37%
MonkeyBuccaneer 173 48 125 27.75% 2.72% 21.07%
DartlingGunner 33 12 21 36.36% 0.52% 19.95%
MonkeyVillage 67 20 47 29.85% 1.05% 18.89%
SuperMonkey 63 17 46 26.98% 0.99% 16.02%
IceMonkey 49 14 35 28.57% 0.77% 15.92%
BoomerangMonkey 103 22 81 21.36% 1.62% 13.44%

Advanced export

JSON shape: default, array, newline-delimited

CSV options:

CREATE VIEW ports_towers AS 
WITH ports AS
    (SELECT *
    FROM matches
    WHERE map = 'ports')
SELECT Tower,
       Games,
       Wins,
       Losses,
       printf('%.2f%%', WR * 100)                                          AS Winrate,
       printf('%.2f%%', PR * 100)                                          AS Pickrate,
       printf('%.2f%%', (WR - 1.96 * SQRT((WR * (1 - WR)) / Games)) * 100) AS Winrate_LowerBound_95CI
FROM (SELECT Tower,
             Games,
             Wins,
             Losses,
             CAST(Wins AS REAL) / Games AS WR,
             CAST(Games AS REAL) / (
                 (SELECT COUNT(*)
                  FROM ports) * 6)    AS PR
      FROM (SELECT Tower,
                   SUM(Win) + SUM(NOT Win) AS Games,
                   SUM(Win)                AS Wins,
                   SUM(NOT Win)            AS Losses
            FROM (SELECT lt1           AS Tower,
                         playerLeftWin AS Win
                  FROM ports
                  UNION ALL
                  SELECT lt2           AS Tower,
                         playerLeftWin AS Win
                  FROM ports
                  UNION ALL
                  SELECT lt3           AS Tower,
                         playerLeftWin AS Win
                  FROM ports
                  UNION ALL
                  SELECT rt1               AS Tower,
                         NOT playerLeftWin AS Win
                  FROM ports
                  UNION ALL
                  SELECT rt2               AS Tower,
                         NOT playerLeftWin AS Win
                  FROM ports
                  UNION ALL
                  SELECT rt3               AS Tower,
                         NOT playerLeftWin AS Win
                  FROM ports)
            GROUP BY Tower))
WHERE Wins >= 10 AND Losses >= 10 AND LENGTH(Winrate_LowerBound_95CI) = 6
ORDER BY Winrate_LowerBound_95CI DESC;
Powered by Datasette · Queries took 3543.856ms