SearchKit : use of rows in query cause mysql errors
When doing a Group by in the query, and displaying the results with a pager, I get this error :
$Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => SELECT count(*) AS `c` FROM ( SELECT `a`.`id` AS `id`
FROM civicrm_contact a
WHERE (`a`.`is_deleted` = "0")
HAVING (`id` IS NOT NULL)
) AS rows [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows' at line 5]
[type] => DB_Error
[user_info] => SELECT count(*) AS `c` FROM ( SELECT `a`.`id` AS `id`
FROM civicrm_contact a
WHERE (`a`.`is_deleted` = "0")
HAVING (`id` IS NOT NULL)
) AS rows [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows' at line 5]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT count(*) AS `c` FROM ( SELECT `a`.`id` AS `id`
FROM civicrm_contact a
WHERE (`a`.`is_deleted` = "0")
HAVING (`id` IS NOT NULL)
) AS rows [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows' at line 5]"]
)