Help me convert SQL statement to MySQL
you should use concat to join strings.

this column:

'&lt;a href="http://moodle.domain.com/mod/assignment/submissions.php' + char(63) +
+ 'id=' + cast(cm.id AS varchar) + '&amp;userid=' + cast(u.id AS varchar) +
+ '&amp;mode=single&amp;filter=0&amp;offset=2"&gt;' + a.name + '&lt;/a&gt;'
AS "Assignmentlink"


in mysql should write as this:

concat('&lt;a href="http://moodle.domain.com/mod/assignment/submissions.php'，char(63) , 'id=' , cast(cm.id AS varchar) , '&amp;userid=' , cast(u.id AS varchar)  , '&amp;mode=single&amp;filter=0&amp;offset=2"&gt;' , a.name , '&lt;/a&gt;')
AS "Assignmentlink"