I have table with 3 columns(smallint) in SQL Server 2005.
Table Ratings
ratin1 smallint,
ratin2 smallint
ratin3 smallint
These columns can have values from 0 to 5
How to select average value of these fields, but only compare fields where value is greater then 0.
So if column values are 1,3,5 - average had to be 3 if values are 0,3,5 - average had to be 4