SELECT 
	*
FROM cms_tags
LEFT JOIN cms_taggroups ON tag_taggroup_id = taggroup_id
LEFT JOIN ( 
	SELECT tin_tag_id,GROUP_CONCAT(tin_node_id)AS node_ids_csl
	FROM cms_tags_in_nodes
	GROUP BY tin_tag_id
) nodes ON tag_id = tin_tag_id
WHERE tag_id IN (:ids)
ORDER BY tag_name 
