title: query syntax issue upgrading to mysql 8 from 5.7
body: <p>I have this sql query which worked in mysql server 5.7 but won't work after upgrading to version 8.0.12  </p>
  
  <pre><code>SELECT sID, FNames, total, grade, h_score, l_score, stud_per_sub, RANK FROM 
  (SELECT k.sID, concat(s.surName,'  ', s.firstName,'  ', s.oNames) AS 
  'FNames', k.total, k.h_score, k.stud_per_sub, k.l_score, k.grade, @curRank 
  := if(@prevRank = k.total, @curRank, @incRank) AS rank, @incRank := @incRank 
  + 1, @prevRank := k.total FROM terminal_assessment k LEFT JOIN student s ON 
  (s.studentID = k.sID), (SELECT @curRank := 0, @prevRank := null, @incRank := 
  1) r WHERE k.subj_TeacherID=:sid AND k.session=:sess AND k.classID=:cid AND 
  k.term=:trm AND k.subid=:subject ORDER BY k.total desc) AS m;
  </code></pre>
  
  <p>It gives this error message </p>
  
  <blockquote>
    <p>(Error Code: 1064. You have an error in your SQL syntax; check the
    manual that corresponds to your MySQL server version for the right
    syntax to use near 'from [select k.sID, concat(s.surName,'  ',
    s.firstName,'  ', s.oNames) AS 'FName' at line 1)</p>
  </blockquote>
  
  <p>each time i tried running it</p>