Home Forums SQL Server 2008 SQL Server Newbies Convert Excel formula to SQL RE: Convert Excel formula to SQL<!-- 864 -->

  • I did not change the code for the WinLossSum. Thanks again!

    CREATE VIEW WinLossSum AS

    SELECT Team, SUM(Result) Wins, SUM(Result^1) Losses

    FROM WinLoss

    GROUP BY Team

    Results

    TEAM......WINS......LOSSES

    ..A............ 6..............0...

    ..B............6..............0....

    ..C............ 4..............2...

    ..D............ 3..............2...

    ..E............ 3..............3...

    ..F............ 3..............3...

    ..G............ 3..............3...

    ..H............1..............5....

    ..I.............0..............5....

    ..J.............0..............6....