Hello,
When you have a SQL query ; that's way better to indicate the call stack in order to understand from where the query is generated.
Lucky for you, there is just one place where there is a " COUNT(name) " in the HikaShop code, the widget class.
Please try to change
if($widget->widget_params->customers=='total_customers'){
$filters = '';
By
if($widget->widget_params->customers=='total_customers'){
$filters = array();
If the problem persist ; we would need more details about your widget configuration and I would recommend you to deactivate the legacy dashboard in order to use the new HikaShop 3 dashboard ; the widget system is considered as deprecated.
Regards,