On our system customers can place orders but only up to a certain total count and total amount per day, lets say for this example a maximum of 10 orders totalling £1000. What I need to determine is the current count and amount of orders placed by a particular customer at any point during the day.
The first two events raised during an order and held against the aggregate contain the data need as follows:
Contains the Amount
Contains a customer Id
I’m attempting without much luck to write a query that can hit the ‘Order’ category returning a total count of orders and total amount of orders for a particular customer on the current day. I believe this should be possible using a single query, I basically want to pass in a customer Id and get a total count & amount returned. Can anyone provide some help?