SELECT
courses.id,
courses.created_at,
courses.name,
courses.author AS author_id,
users.first_name || ' ' || users.last_name AS author_name,
ARRAY_SIZE(courses.elements) AS nb_activities_in_the_course,
ARRAY_SIZE(FILTER(courses.translations_langs, i -> i:published = TRUE)) AS nb_translations_published
FROM qwnogpy_ww21770_datasharing.core.courses
LEFT JOIN qwnogpy_ww21770_datasharing.core.users
ON courses.author = users.id
id: ID of the coursecreated_at: timestamp when the course was createdname : name of the courseauthor_id : ID of the author of the courseauthor_name : Name of the author of the coursenb_activities_in_the_course: Number of elements (sheet, media, question…) contained in the coursenb_translations_published: Number of translations of the course that are publishedFetch the translations of a course