|
|
@@ -13,13 +13,14 @@ AS
|
|
|
WHERE otp.organization_id = o.id)
|
|
|
AS practices,
|
|
|
oar.articles, n1.parent_id as parentId, net1.name as parentName,
|
|
|
- CONCAT_WS(',', n1.parent_id, n2.parent_id, n3.parent_id, n4.parent_id, n5.parent_id) as parents
|
|
|
-
|
|
|
+ CONCAT_WS(',', n1.parent_id, n2.parent_id, n3.parent_id, n4.parent_id, n5.parent_id) as parents,
|
|
|
+ CONCAT('[', GROUP_CONCAT(DISTINCT(COLUMN_JSON(COLUMN_CREATE('id', ac.id,'name', ac.name, 'description', ac.description, 'imageId', ac.imageActivity_id)))), ']') as sections
|
|
|
FROM opentalent.Organization o
|
|
|
INNER JOIN opentalent.Parameters p on o.parameters_id = p.id
|
|
|
LEFT JOIN opentalent.OrganizationAddressPostal oa on oa.organization_id = o.id
|
|
|
LEFT JOIN opentalent.AddressPostal a on oa.addressPostal_id = a.id
|
|
|
LEFT JOIN opentalent.Country c ON (c.id = a.addressCountry_id)
|
|
|
+ LEFT JOIN opentalent.Activity ac ON (ac.organization_id = o.id)
|
|
|
LEFT JOIN opentalent.organization_contactpoint ocp ON ocp.organization_id = o.id
|
|
|
INNER JOIN (SELECT * FROM opentalent.ContactPoint WHERE `contactType`='PRINCIPAL') cp ON cp.id = ocp.contactPoint_id
|
|
|
LEFT JOIN (
|