I need to perform an avg on a column, but I know that most of the values in that column will be zero. Out of all possible rows, only two will probably have positive values. How
You can convert zeros to NULL, then AVG() function will work only with not NULL values.
NULL
AVG()
UPDATE table SET column = NULL WHERE column='0'; SELECT AVG(column) FROM table;