Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offene liga ohne feste spieltage/teams abbildbar machen #41

Open
steam0r opened this issue Nov 24, 2021 · 0 comments
Open

offene liga ohne feste spieltage/teams abbildbar machen #41

steam0r opened this issue Nov 24, 2021 · 0 comments

Comments

@steam0r
Copy link
Owner

steam0r commented Nov 24, 2021

dann irgendwie nach gewinnquotient die tabelle bilden:

https://www.evanmiller.org/how-not-to-sort-by-average-rating.html

    SELECT
        name,
        wins,
        losses,
        ((wins + 1.9208) / (wins + losses) - 1.96 * SQRT((wins * losses) / (wins + losses) + 0.9604) / (wins + losses)) / (1 + 3.8416 / (wins + losses)) AS ci_lower_bound 
    FROM (
        SELECT 
            team.name as names, 
            sum(win) as wins,
            sum(loss) as losses
        FROM team_scores
        JOIN teams as team ON team.id = team_id
        WHERE gameDay_id >= 866 AND gameDay_id <= 1001
        GROUP BY team_id
    ) as scores
    WHERE wins + losses > 0
    ORDER BY ci_lower_bound DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant