Fix some typos in sqlite and mysql queries