Overview stats

This commit is contained in:
2020-06-17 23:50:08 +02:00
parent 01b994601b
commit 94eb70c24e
12 changed files with 188 additions and 19 deletions

View File

@@ -292,6 +292,12 @@ abstract class SQL {
}
}
public function sum($col) {
$sumCol = strtolower(str_replace(".","_", $col)) . "_sum";
$col = $this->columnName($col);
return new Keyword("SUM($col) AS $sumCol");
}
public function distinct($col) {
$col = $this->columnName($col);
return new Keyword("DISTINCT($col)");