SELECT
	x1.id AS id,
	MIN(x2.value) AS type,
	GROUP_CONCAT(DISTINCT x4.value) AS tags,
	GROUP_CONCAT(x6.value || ':' || x5.value) AS translations
FROM
	concepts AS x1
	LEFT OUTER JOIN types AS x2 ON (x1.type_id = x2.id)
	LEFT OUTER JOIN concept_tags AS x3 ON (x1.id = x3.concept_id)
	LEFT OUTER JOIN tags AS x4 ON (x3.tag_id = x4.id)
	LEFT OUTER JOIN concept_translations AS x5 ON (x1.id = x5.concept_id)
	LEFT OUTER JOIN languages AS x6 ON (x5.language_id = x6.id)
GROUP BY
	x1.id
;

