Fix SQL error with duplicate limit statement
https://www.howtoforge.com/community/threads/sql-error-mariadb.75060/