The query look like missing values for conditions. Do you have the full query you use?