-
Notifications
You must be signed in to change notification settings - Fork 1
Having
Gilberto Junior edited this page Nov 29, 2019
·
3 revisions
This method agroups rows to summarize.
public function having(string $column, string $comparator, string|int|bool|float $value): self;
public function having(string $sql): self;
PHP's way:
$repository->having('COUNT(id)', '>', 1);
SQL's Representation:
HAVING
COUNT(id) > 1
PHP's way:
$repository->having('SUM(quantity) > 1000');
SQL's Representation:
HAVING
SUM(quantity) > 1000
by c0dehappy