Improve SQL queries (more condition operators)