Fixed sqlite syntax