Fixed typos in sql queries

Fixed typos that worked on my pc but not on the clipper server.