Configurable reports

Configurable reports

by Zhasulan Zhumadilov -
Number of replies: 0

Hello

Prompt please, there is a problem in unloading the SQL report/

SELECT DISTINCT
    gg.userid AS ID,
    gg.finalgrade Grade,
    CONCAT(u.lastname,' ',u.firstname) Name,
    u.email Email,
    u.username Login,
    uid.data 'Group'
FROM
    {grade_grades} gg
    JOIN {grade_items} gi ON gi.id = gg.itemid
    JOIN {course_modules} cm ON cm.course = gi.courseid
    %%FILTER_COURSES:cm.course%%
    %%FILTER_COURSEMODULE:cm.module%%
    JOIN {user} u ON gg.userid = u.id AND u.deleted = 0
    JOIN {user_info_data} uid ON uid.userid = u.id
    JOIN {user_info_field} uif ON uif.id=uid.fieldid
WHERE
    gg.finalgrade <> ""

- uid.data 'Group' - The problem is loading additional registration fields. When viewing the upload, the fields are displayed in a new line and not in a column. That is, the lines are repeated except for GROUP - Login, date of birth and other created fields.

Tell me how to write a request correctly please.

Average of ratings: -