I have this SQL which updates rows on MySQL, but I need to rewrite it so that it will work on PostgreSQL as well. I'm aware that I can make it work for PostgreSQL using a different syntax, but I need one statement which will work for both systems.
UPDATE {coursework_feedbacks} AS f
INNER JOIN {coursework_submissions} AS s
ON f.submissionid = s.id
INNER JOIN {coursework} c
ON s.courseworkid = c.id
SET f.stage_identifier = 'assessor_1'
WHERE f.ismoderation = 0
AND f.isfinalgrade = 1
AND c.numberofmarkers = 1