diff --git a/core-bundle/contao/library/Contao/Model/QueryBuilder.php b/core-bundle/contao/library/Contao/Model/QueryBuilder.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/library/Contao/Model/QueryBuilder.php
+++ b/core-bundle/contao/library/Contao/Model/QueryBuilder.php
@@ -83,6 +83,12 @@ class QueryBuilder
 			$strQuery .= " GROUP BY " . $arrOptions['group'];
 		}
 
+		// Having (see #6446)
+		if ($arrOptions['having'] !== null)
+		{
+			$strQuery .= " HAVING " . $arrOptions['having'];
+		}
+
 		// Order by
 		if ($arrOptions['order'] !== null)
 		{
[Core] Support the "HAVING" command in the `Model\QueryBuilder` class (see #<I>)