[Solved] Generate payment from more than 1 columns in SQL


Try this query :

select
    OrderId,
    CustomerName,
    sum(ProductAmount*Price) as Total
from
    Order O
    inner join OrderDetail OD on
        O.Id = OD.Id
group by
    OrderID,
    CustomerName

solved Generate payment from more than 1 columns in SQL