public function avg($colName)
    {
        if ($this->countData()>0) {
            return $this->sum($colName)/$this->countData();
        }
        return false;
    }
public function avg($colName)
    {
        if ($this->countData()>0) {
            return $this->sum($colName)/$this->countData();
        }
        return false;
    }
public function avg ( $ colName ) { if ( $ this -> countData ( ) > 0 ) { return $ this -> sum ( $ colName ) / $ this -> countData ( ) ; } return false ; }
Return the average value of a field

Examples: $averageSale = $dataStore->avg("saleAmount");

@param string $colName Name of column you want to get average

@return float Average value of column
Return the average value of a field