I have a table similar to this:
| customer | shop | available_A | available_B | available_C |
|---|---|---|---|---|
| 123456 | A | True | True | False |
| . | B | False | True | True |
| . | C | True | False | True |
I want to only select True values of a specific "available" column based on the specific shop value, so something like:
select (available_A = 'True' where shop = 'A' AND
available_B = 'True' where shop = 'B' AND
available_C = 'True' where shop = 'C')
All of them at the same script.