[fix] sql:concept:dump
Christian Fraß

Christian Fraß commited on 2021-03-04 08:18:04
Zeige 1 geänderte Dateien mit 3 Einfügungen und 3 Löschungen.

... ...
@@ -3,7 +3,7 @@ SELECT
3 3
 	MIN(x2.value) AS type,
4 4
 	MIN(x1.description) AS description,
5 5
 	GROUP_CONCAT(DISTINCT x4.value) AS tags,
6
-	GROUP_CONCAT(x7.value || ':' || x6.value) AS expressions
6
+	GROUP_CONCAT(DISTINCT (x7.value || ':' || x6.value)) AS expressions
7 7
 FROM
8 8
 	concepts AS x1
9 9
 	LEFT OUTER JOIN types AS x2 ON (x1.type_id = x2.id)
... ...
@@ -11,12 +11,12 @@ FROM
11 11
 	LEFT OUTER JOIN tags AS x4 ON (x3.tag_id = x4.id)
12 12
 	LEFT OUTER JOIN concept_expressions AS x5 ON (x1.id = x5.concept_id)
13 13
 	LEFT OUTER JOIN expressions AS x6 ON (x5.expression_id = x6.id)
14
-	LEFT OUTER JOIN languages AS x7 ON (x5.language_id = x7.id)
14
+	LEFT OUTER JOIN languages AS x7 ON (x6.language_id = x7.id)
15 15
 WHERE
16 16
 	(
17 17
 		(:part IS NULL)
18 18
 		OR
19
-		(x5.value LIKE :part)
19
+		(x6.value LIKE :part)
20 20
 	)
21 21
 GROUP BY
22 22
 	x1.id
23 23