select Team_Leader ,items ,Sum(qty) as Total_Qty,avg(Rate) as Average_Rate FROM [Material_database].[dbo].[mat_utiAndtrans] m, [Material_database].[dbo].[code] c where c.Codes=m.code group by Team_leader ,items
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)