or maybe this:
select a.prodid
,e.tag
from prodtable as a
inner join (select b.prodid
,min(itemid) as itemid
from (select prodid
,min(qty) as qty
from prodbom
group by prodid
) as b
inner join prodbom as c
on c.prodid=b.prodid
and c.qty=b.qty
) as d
on d.prodid=a.prodid
left outer join colorcoding as e
on e.itemid=d.itemid