There are cases where group by is not required when using having.
The following is valid in mariadb.
SELECT COUNT(*) as count FROM security_event WHERE security_event.mac = "00:00:00:00:00:00" AND tenant_id = 1 AND status = 'closed' HAVING count(*) = 0;
There are cases where group by is not required when using having. The following is valid in mariadb.