Below is an example of my table:
Column A Column B Column C Tom Blue 10 Tom Orange 12 Alex Blue 30 Alex Orange 29 Lisa Orange 15 Lisa Blue 14
Column A Blue Orange Tom 10 12 Lisa 14 15
The output above returns when there are two duplicate values in Column A, Column B Blue value in Column C is less than Column B Orange value in Column C.
So far I have...
select Column A, Column B as "Blue", Column B as "Orange" from table where Blue < Orange;. Obviously where Blue < Orange doesn't work but that's the logic.
I think I need to write a subquery but I cannot figure this out.