1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Update src/Appwrite/Stats/Usage.php

Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
This commit is contained in:
Damodar Lohani 2022-06-15 05:08:23 +05:45 committed by GitHub
parent ac13c8e79f
commit ccb53ff1d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,7 +237,13 @@ class Usage
$filters = '';
}
$query = "SELECT sum(value) AS \"value\" FROM \"{$table}\" WHERE \"time\" > '{$start}' AND \"time\" < '{$end}' AND \"metric_type\"='counter' {$filters} GROUP BY time({$period['key']}), \"projectId\" {$groupBy} FILL(null)";
$query = "SELECT sum(value) AS \"value\" ";
$query .= "FROM \"{$table}\" ";
$query .= "WHERE \"time\" > '{$start}' ";
$query .= "AND \"time\" < '{$end}' ";
$query .= "AND \"metric_type\"='counter' {$filters} ";
$query .= "GROUP BY time({$period['key']}), \"projectId\" {$groupBy} ";
$query .= "FILL(null)";
$result = $this->influxDB->query($query);
$points = $result->getPoints();