Unknown column 'a.category' in 'field list'
SQLselect a.price, a.discount, a.margin, a.category, f.title, f.hash, f.created, f.datemodify, f.filename, f.filepath, f.thumb_filepath, f.extension, f.size from (
select p.file_id, p.price, p.discount, p.margin, min(a.id) as product_id
from `fr_products` a
left join fr_rubrics b on a.rubric_id = b.id
right join `fr_product_colors` p on a.id = p.product_id
where b.published = 1 and b.alias = 'bambukovye' and a.product_color_depend_id is null
group by p.file_id, p.price, p.discount, p.margin, b.id
) a
left join `fr_files` f on a.file_id=f.id