For building single case reports from a survey I' d like to access the 'lime_survey_{SID}' table in the MySQL Limesurvey Database with an SQL Query. The column heads of this table have the {sid}X{gid}X{qid} format which is not very handy for the building of the report. Instead I would like to have the questioncode as column header which gives better information about the content of the data. As this is an option if you export survey manually there must be a script in LimeSurvey which exactly does this job.
Has anyone an idea, where I can look for it or how this could be handled?