',
a.object_id /*ID*/,
' | ',
ifnull(group_concat(DISTINCT a.object_name SEPARATOR '; '),'') /*Objekt*/,
' | ',
ifnull(group_concat(distinct a.object_term SEPARATOR '; '),'') /*Bezeichnung in der Quelle*/,
' | ',
ifnull(group_concat(DISTINCT b.entity_date SEPARATOR '; '),'') /*Erwähnungsdatum*/,
' | ',
ifnull(group_concat(DISTINCT a.material SEPARATOR '; '),'') /*Material*/,
' | ',
ifnull(group_concat(DISTINCT a.technique SEPARATOR '; '),'') /*Technik*/,
' | ',
ifnull(group_concat(DISTINCT a.`function` SEPARATOR '; '),'') /*Funktion*/,
' | ',
ifnull(group_concat(DISTINCT a.object_type SEPARATOR '; '),'') /*Objekttyp*/,
' | ',
ifnull(group_concat(DISTINCT a.object_amount SEPARATOR '; '),'') /*Anzahl*/,
' | ',
ifnull(group_concat(DISTINCT a.object_value SEPARATOR '; '),'') /*Wert*/,
' | ',
ifnull(group_concat(DISTINCT a.object_unit SEPARATOR '; '),'') /*Einheit*/,
' | ',
ifnull(group_concat(DISTINCT a.description SEPARATOR '; '),'') /*Beschreibung*/,
' | ',
ifnull(group_concat(DISTINCT d.family_name, ', ', d.first_name, ' (ID: ', d.person_id, ') ', c.relationship_type SEPARATOR '; '),'') /*Beziehung zu Person*/,
' | ',
ifnull(group_concat(DISTINCT i.book_name, ', folio ', h.folie_nr SEPARATOR '; '),'') /*Quellenfundstelle*/,
' | ',
ifnull(GROUP_CONCAT(distinct f.abbreviation, ' ', e.bib_volume, ', S. ', e.bib_page SEPARATOR '; '),'') /*Bibliografie*/,
' |
'
) html
FROM object a
LEFT JOIN entities_dates b ON a.object_id=b.entity_id AND b.entity_type LIKE 'object'
LEFT JOIN entities_relationship c ON a.object_id=c.entity_2_id
AND c.entity_1_type LIKE 'person'
AND c.entity_2_type LIKE 'object'
LEFT JOIN person d ON c.entity_1_id=d.person_id
LEFT JOIN bib_source e ON a.object_id=e.entity_id AND e.entity_type LIKE 'object'
LEFT JOIN bibliography f ON e.bib_id=f.bib_id
LEFT JOIN single_token g ON a.object_id=g.entry_object_id AND g.objekt=1
LEFT JOIN single_page h ON g.page_nr=h.page_nr
LEFT JOIN single_book i ON h.book_id=i.book_id
GROUP BY a.object_id
UNION ALL
SELECT '