Fixed a directory issue creating the DB
Fixed a typo in the SQL query