Hello,
Here the code from the HikaShop statistics class (I just remove content related to the loading of the product image)
'vars' => array(
'DATE_RANGE' => 'this.month',
),
'query' => array(
'get' => 'object',
'select' => array(
'key' => 'hk_product.product_id AS id',
'name' => 'hk_product.order_product_name AS name',
'value' => 'ROUND(SUM(hk_product.order_product_price * hk_product.order_product_quantity),2) AS value',
'counter' => 'COUNT(hk_order.order_id) AS counter'
),
'tables' => array(
hikashop_table('order_product') . ' AS hk_product',
'INNER JOIN ' . hikashop_table('order') . ' AS hk_order ON hk_order.order_id = hk_product.order_id',
),
'filters' => array(
'order_type' => 'hk_order.order_type = '.$order_type.'',
'order_status' => ('hk_order.order_status IN ('.implode(',', $valid_order_statuses).')'),
'order_created' => ($created_status ?
'hk_order.order_created >= {DATE_START} AND ({DATE_END} <= 0 OR hk_order.order_created <= {DATE_END})' :
'hk_order.order_invoice_created >= {DATE_START} AND ({DATE_END} <= 0 OR hk_order.order_invoice_created <= {DATE_END})'),
),
'order' => 'value DESC',
So basically, the query is made to select the product with the highest cumulative sold price within the month.
To select the orders, it based the search on the "order_invoice_created" field which is fill with the timestamp when the invoice number is generated. And your latest screenshot indicate that it should be good.
Afterwards, you still have the possibility to activate the Joomla debug mode to see the list of your SQL queries and repeat the query in your end to see the raw values.
Regards,