It will only look for games where both the winner AND loser were 'nj'! That's the biggy; there are other bugs.
It might be easier to do this in PHP.
SELECT COUNT(*) as wins FROM games WHERE winner='nj'
SELECT COUNT(*) as losses FROM games WHERE loser='nj'
Do those queries, get the $wins and $losses from the rows returned, and then
if($losses==0 && $wins==0) $percentage=0;
elseif($losses==0) $percentage=100;
else $percentage=100*$wins/$losses;