addToQuery( new Reduce($settings, $identity) ); return $this; } public function addSort(array $columns, $desc): QueryBuilderInterface { $this->addToQuery( new Sort($columns, $desc) ); return $this; } public function addMap($query): QueryBuilderInterface { $this->addToQuery( new Map($query) ); return $this; } public function addGroup(array $columns, $mode = 'by'): QueryBuilderInterface { $this->addToQuery( new Group($columns, $mode) ); return $this; } public function addLimit(int $limit, int $offset = 0): QueryBuilderInterface { $this->addToQuery( new Limit($limit, $offset) ); return $this; } public function addWindow($every, array $options = []): QueryBuilderInterface { $this->addToQuery( new Window($every, $options) ); return $this; } public function addDuplicate(string $column, string $as): QueryBuilderInterface { $this->addToQuery( new Duplicate($column, $as) ); return $this; } public function addMean(?string $column = ''): QueryBuilderInterface { $this->addToQuery( new Mean($column) ); return $this; } public function addUnWindow(): QueryBuilderInterface { $this->addToQuery( new Window('inf') ); return $this; } public function addAggregateWindow($every, $fn, array $options = []): QueryBuilderInterface { $this->addToQuery( new AggregateWindow($every, $fn, $options) ); return $this; } public function addSum(string $column): QueryBuilderInterface { $this->addToQuery( new Sum($column) ); return $this; } public function addLast(string $column = '_value'): QueryBuilderInterface { $this->addToQuery( new Last($column) ); return $this; } }