select p.id,p.parent_id,group_concat(distinct(CONCAT("分类名称:",c.name)) order by c.id desc separator " || ") as remark from picture as p left join category as c on c.parent_id = p.parent_id group by p.parent_id;