I have a query that gets data based on multiple tables
select A.id, B.type
From A
Inner join B on A.id = B.id
I have two more tables
X(id,state) and Y(id, state)
And A.a could be either in X or in Y.
I don’t need any columns from X or Y. I need to remove from select those which have X.state=”disabled”