[UPDATE] fixed typo in sql queries