`waehrung`,
`ort`,
`bindungsart`,
+ GROUP_CONCAT( DISTINCT `autor_id` SEPARATOR ', ' ) AS `autor_ids`,
GROUP_CONCAT( DISTINCT `autor_name` ORDER BY `autor_ord_num` SEPARATOR ', ' ) AS `autoren`,
+ GROUP_CONCAT( DISTINCT `kategorie_id` SEPARATOR ', ' ) AS `kategorie_ids`,
GROUP_CONCAT( DISTINCT `kategorie` ORDER BY `kategorie` SEPARATOR ', ' ) AS `kategorien`,
+ GROUP_CONCAT( DISTINCT `serien_id` SEPARATOR ', ' ) AS `serien_ids`,
GROUP_CONCAT( DISTINCT `serie` ORDER BY `serie` SEPARATOR ', ' ) AS `serien`
FROM ( SELECT b.`id` AS `buch_id`,
b.`title` AS `title`,
'`'
) AS `autor_name`,
ab.`ord_num` AS `autor_ord_num`,
+ CONCAT( '`', a.`id`, '`' ) AS `autor_id`,
a.`titel` AS `autor_titel`,
a.`vorname` AS `autor_vorname`,
a.`mittelname` AS `autor_mittelname`,
a.`name_suffix` AS `autor_name_suffix`,
v.`name_short` AS `verlag`,
o.`name` AS `ort`,
+ CONCAT( '`', k.`id`, '`' ) AS `kategorie_id`,
CONCAT( '`', k.`kategorie_name`, '`' ) AS `kategorie`,
+ CONCAT( '`', s.`id`, '`' ) AS `serien_id`,
CONCAT( '`', s.`serien_name`, '`' ) AS `serie`,
bi.`art_name` AS `bindungsart`
FROM autor2buch AS ab