I want to execute a subquery using the current customer ID as I try to describe below
SELECT DISTINCT Customer_Id,
(SELECT SUM (total) FROM Orders where Customer_Id = Customer_Id AND CAST(Date) > DayIspecify )
FROM Orders where shop_id= '1-9THT'
What I want is to calculate the SUM each customer spent over a specified time period on the specific shop.