How to set up a calculation in a query with criterion

I have a base of Customers with purchases. I want to create a query that will sum the individual purchases for only that customer. My base has all the purchases from all the customers. I also would like to be able to limit it to just one date or date range. That way for example I could print out the sum for a specific customer but only for one week and not all his purchases from start to now.

I think you can find useful help in Base Tutorial (Mario Casanova) and TDF Documentation

And the simple answer is?