protected function getQueryType(Metric $metric)
    {
        if (!isset($metric->calc_type) || $metric->calc_type == Metric::CALC_SUM) {
            return "sum({$this->getMetricPointsTable()}.value * {$this->getMetricPointsTable()}.counter) AS value";
        } elseif ($metric->calc_type == Metric::CALC_AVG) {
            return "avg({$this->getMetricPointsTable()}.value) AS value";
        } else {
            return "sum({$this->getMetricPointsTable()}.value * {$this->getMetricPointsTable()}.counter) AS value";
        }
    }
protected function getQueryType(Metric $metric)
    {
        if (!isset($metric->calc_type) || $metric->calc_type == Metric::CALC_SUM) {
            return "sum({$this->getMetricPointsTable()}.value * {$this->getMetricPointsTable()}.counter) AS value";
        } elseif ($metric->calc_type == Metric::CALC_AVG) {
            return "avg({$this->getMetricPointsTable()}.value) AS value";
        } else {
            return "sum({$this->getMetricPointsTable()}.value * {$this->getMetricPointsTable()}.counter) AS value";
        }
    }
protected function getQueryType ( Metric $ metric ) { if ( ! isset ( $ metric -> calc_type ) || $ metric -> calc_type == Metric :: CALC_SUM ) { return "sum({$this->getMetricPointsTable()}.value * {$this->getMetricPointsTable()}.counter) AS value" ; } elseif ( $ metric -> calc_type == Metric :: CALC_AVG ) { return "avg({$this->getMetricPointsTable()}.value) AS value" ; } else { return "sum({$this->getMetricPointsTable()}.value * {$this->getMetricPointsTable()}.counter) AS value" ; } }
Return the query type.

@param \CachetHQ\Cachet\Models\Metric $metric

@return string
Return the query type .