DB Error: ERROR: syntax error at or near ")" LINE 7: () AND (a.country IS NULL OR a.country = '') AND s.conte... ^