category
нет subcategory
для id_subcat (110, 111)
.goods
обрезан id_cat
или нет разделения на подкатегории.SELECT goods.name_goods, subcategory.name_subcat, category.name_cat
FROM goods
LEFT OUTER JOIN category ON goods.id_cat = category.id
LEFT OUTER JOIN subcategory ON goods.id_cat = subcategory.id_subcat / 10