- Two different operating places in the background.
- Choose the same time (one day) for testing.
- The output is different.
- SALES Order count is same as my database query result.
check if the statistics data is up to date. Data for the report needs to be rebuilt by cron or manually
check your timezone settings. I had issues with this in magento 1 when my timezone was not UTC, and orders where placed around 0am +/- a few hours This might also be an issue for the results of the db query in comparison to any other data, because the date in the database is actually stored in UTC, but shown converted to your timezone in the backend
I'm glad the problem has been solved. https://github.com/magento/magento2/issues/14500