Query
SELECT
courses.id,
courses.created_at,
courses.name,
courses.source_lang,
flattened_translations.value['lang']::varchar AS translation_lang,
flattened_translations.value['published']::boolean AS is_translation_published
FROM qwnogpy_ww21770_datasharing.core.courses,
TABLE(FLATTEN(courses.translations_langs)) flattened_translations
ORDER BY courses.created_at DESC, courses.name, translation_lang
Description
id: ID of the course
created_at: timestamp when the course was created
name : name of the course
source_lang: source language of the course (language it which it was initially created)
translation_lang: translation language of the course
is_translation_published: TRUE if the course was published in this translation language
To go further
Fetch courses with a translation published
Fetch the elements of a course