I have two tables
Unit
Unit_id Unit_name Unit_cost
Components
Component_id Component_
I think you want something like this:
select top (1) u.unit_name from unit u join component c on c.unit_id = u.unit_id group by u.unit_id, u.unit_name order by sum(c.cost) desc;