I have a table that contains football teams, and the number of wins and losses that they have. I am ordering them by win percentage, so they are in order of first place down to last. Here is my query:
select * from nfcnorth
order by won / won + loss
The problem is when a team has no wins. this causes a division by zero, which of course causes an error. what can I do about this?
select * from nfcnorth
order by won / won + loss
The problem is when a team has no wins. this causes a division by zero, which of course causes an error. what can I do about this?