Good morning.
I am trying to make a query in MySQL given the following cases.
Table codings
id| nombre
------------------------
1 | Correo electronico
2 | Videoconferencia
3 | Foro
4 | Otros
Table tutorials
id|tipo_tutoria
------------
1|1,3
2|2,4
3|2
4|1,2,3
5|
Given these tables, the result I would like to achieve is the following:
id|tipo_tutoria
------------
1|Correo electronico,Foro
2|Videoconferencia,Otros
3|Videoconferencia
4|Correo electronico,Videoconferencia,Foro
5|
The most I have come to achieve is the following query:
SELECT GROUP_CONCAT (name) FROM encodings WHERE find_in_set ( id, (SELECT type_tutoria FROM tutorías) );
Getting the following result:
id|tipo
------------
1|Correo electronico
2|Videoconferencia
3|Videoconferencia
4|Correo electronico
5|
Any help would be very much appreciated. Greetings!