select c.CustomerId,c.CustomerName, sum(o.OrderAmount) as 'Total Amount' from Customer c join [Order] o on c.CustomerId = o.CustomerId group by c.CustomerId, c.CustomerName
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)