I use the follown as one movie's page
SELECT
`mt_films`.`Title1` AS `Title1`,
GROUP_CONCAT(DISTINCT `t_idiotita`.`idiotita`,
': ',
`t_people`.`person`
ORDER BY `t_idiotita`.`cnt_gr_id` ASC
SEPARATOR ' ') AS `kati`
FROM
((`t_people`
JOIN (`st_peoplefilms`
JOIN `mt_films` ON ((`mt_films`.`ID_films` = `st_peoplefilms`.`ID_films`))) ON ((`t_people`.`ID_person` = `st_peoplefilms`.`ID_person`)))
JOIN `t_idiotita` ON ((`st_peoplefilms`.`ID_idiotita` = `t_idiotita`.`ID_idiotita`)))
WHERE
((`st_peoplefilms`.`ID_idiotita` = 29)
OR (`st_peoplefilms`.`ID_idiotita` = 33)
OR (`st_peoplefilms`.`ID_idiotita` = 27)
OR (`st_peoplefilms`.`ID_idiotita` = 12)
OR (`st_peoplefilms`.`ID_idiotita` = 43)
OR (`st_peoplefilms`.`ID_idiotita` = 11)
OR (`st_peoplefilms`.`ID_idiotita` = 32)
OR (`st_peoplefilms`.`ID_idiotita` = 5)
OR (`st_peoplefilms`.`ID_idiotita` = 24)
OR (`st_peoplefilms`.`ID_idiotita` = 14))
GROUP BY `mt_films`.`Title1`
That returns e.g.
Title1 | Dir.: John | Script: Peter | Script: Anna | ...
Title2 | Dir.: George | Dir.: Paul | Script: Gus | ...
But while for many many movies work more than one person for the same specialty i need a second group_concat to group all the persons for the same specilty. I also need two different separations. The first ": " separates the specialties and the second ", " the persons
Expected result
Title1 | Dir.: John | Script: Peter, Anna | ...
Title2 | Dir.: George, Paul | Script: Gus | ...
Any help?