Fixed syntax of SQL via running on mySQL