In the below code I am trying to find Minimum rate using MIN(rate)
, Maximum rate using MAX(rate)
, and Average Value of rate using AVG(rate)
what I get is the Product for MIN(rate) | MAX(rate) | AVG(rate)
is same result
$this->db->select('MIN(rate),MAX(rate),AVG(rate)');
$this->db->select('my_rates.product');
$this->db->from('my_rates');
$query = $this->db->get();
return $query->result_array();
how to get MIN(rate)
Product MAX(rate)
Product AVG(rate)
Separate