Query

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

Description

To go further

Fetch the translations of a course

Fetch courses with a translation published

Fetch the elements of a course