better SQL statement where definition, fixies