I am creating a shop like database where i have a customer ID and order IDs for each different order. One customer can make multiple orders which are identified by the order ID however this produces a problem when creating my invoice as it always shows all the orders that customer has made rather than just one. Attached is an image of the information i have included to run the query.
How can i get my invoice to just show orders from one day or one specific order for that customer. Otherwise their 'receipt' will show all orders they have ever made with the company and so the total will be wrong.
![]()