for example , this is a table I have .
If B=1 , then A should between 0 and 10 ,so customer1 is selected , customer4 is not selected.
If B=2 , then A should between 11 and 20 ,so customer3 is selected , customer6 is not selected.
If B=3 , then A should between 21 and 30 ,so customer2 is selected , customer5 is not selected.
Final result is customer 1,2,3 are selected.
I tried to write 3 subqueries and join them together, didn’t get the result I want.
I end up getting the customer who meet three conditions , actually I need to get customer who meet any of three conditions.