Unknown column 'a.category_name_in' in 'field list'
SELECT `a`.`id`, `a`.`pid`, `a`.`category_name_in` AS `category_name`, (SELECT COUNT(*) FROM `products` AS `x` WHERE `x`.`category_id`=`a`.`id`) AS `count` FROM `categorys` AS `a` WHERE `a`.`status`= 1 ORDER BY `a`.`pid`,`a`.`sort_id`