• To get the points per game, you need to divide the points by the games played. Then you need to get the greatest value using an aggregate function and grouping them by position.

    Be careful though, there's something called integer division that might give you problems. You need to convert the values into a data type with a decimal point.

    Try this as an example:

    SELECT 99/10 AS IntegerDivision,

    99/10.0 AS NormalDivision;

    I'm not giving you the answer, but I hope this would guide you.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2