If Customer_country = ‘A’
then Ship_country must = ‘A’
and Customer_number <> ‘A2’ (i.e. exclude A2)
and date is between x and y. (same for all Customer country)
The same logic goes for all Customer_country, where respective B2, C2, D2 Customer_numbers are excluded.
I am confused with using CASE…WHEN because it is expected to return a value.
But I am not returning any value. Please help with this query.