select Oders.o_id
,dbo.Customer.cus_name
--,dbo.Billing.bill_amount
,(dbo.Orders_Details.pd_amount * dbo.Products.pd_prize) as Total_Prize
--,sum() as Total_Prize
from dbo.Customer INNER JOIN
dbo.Oders ON dbo.Customer.cus_id = dbo.Oders.cus_id INNER JOIN
dbo.Orders_Details ON dbo.Oders.o_id = dbo.Orders_Details.o_id INNER JOIN
dbo.Products ON dbo.Orders_Details.pd_id = dbo.Products.pd_id INNER JOIN
(select O.o_id from dbo.Oders O inner join dbo.Billing B on O.o_id = B.o_id group by O.o_id) B on (B.o_id = Orders_Details.o_id) left outer join
dbo.Billing on dbo.Oders.o_id = dbo.Billing.o_id
/*where dbo.Billing.bill_date between CONVERT(DATETIME, '20160101') and CONVERT(DATETIME, '20160630')*/
where dbo.Billing.o_id = 1
group by Oders.o_id
,dbo.Customer.cus_name
,dbo.Orders_Details.pd_amount
,dbo.Products.pd_prize