I don’t understand your case statements in your WHERE clause. 'cod_series = 2" is not generally a boolean; cod_series is undefined or at least ambiguous to me without a schema. What are you trying to do there?
1 Like