• This is the exact result...except it seems to be in MSSql...the web server runs MySql

    I did some research after copying the code into the query and receiving errors...maybe this is MS SQL and not MySql

    Does anyone know how to convert this from MSSQL to MySql?

    Again assuming this is the difference....

    This was the error when I run it

    MySQL said: Documentation

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH

    cteWinLose AS

    ( --=== Calculates the wins/losses using a CROSS APPLY to "' at line 1