GROUP BY in sql request and dynamic loading

I have tried to enable dynamic loading with a custom sql with a GROUP BY statement in it but it is not functioning. The problem seems to be in the way the request to obtain the count of total records is constructed(DBDataWrapper::get_size()). Is it a known issue and if so is there a workaround.

Yep, this is known limitation, existing dyn loading will not work for requests which have GROUP BY inside. There are some fixes, which can improve situation, but still complex SQL queries with group by will not work correctly.

You can try to update the existing db_common.php with attached one. (6.51 KB)