InternalError

mysqli error: [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 'rank
                              ,concat(firstname,' ',lastname) name
        ' at line 3] in EXECUTE("SELECT * 
                 FROM (SELECT member_id
                              ,@rank := @rank + 1 as rank
                              ,concat(firstname,' ',lastname) name
                              ,city
                              ,team
                              ,format(yearpoints,1) yearpoints
                              ,format(yearreaction,3) yearreaction
                              ,format(yearspeed,1) yearspeed
                              ,format(yearrate,1) yearrate
                              ,totalshots
                        FROM (select member_id
                               ,concat('',firstname,'') firstname
                               ,concat('',lastname,'') lastname
                               ,city
                               ,team
                               ,yearpoints
                               ,yearreaction
                               ,yearspeed
                               ,yearrate
                               ,recordpoints
                               ,totalshots
                          from t_snapshot
                      order by yearpoints desc) ctab ) ltab  LIMIT 0,50")