Total Sales Query

Shopify Partner
23 0 0

Hi everyone, In case if we need to query the total sales in a period of time and that can be practical to calculate it for a big number of records let us say, for example, 100k records. What is the best way to do it -without GraphQL-, I highly appreciate your support.