Is there a way to select records where certain fields are different?
id | file | idx | values
----|-------|-------|----------------------
1 | 1 | 101 | 1,3,7,11,23,11
2 | 2 | 101 | 1,3,7,11,23,11
3 | 3 | 101 | 0,4,8,60,20,11
4 | 1 | 211 | 12,11,23
5 | 2 | 211 | 12,0,23
6 | 3 | 211 | 12,0,23
7 | 1 | 300 | 1
8 | 2 | 300 | 0
9 | 3 | 300 | 0
I want to select only file=1 and file=2 and look the values in the values column are different. So, a result could be sometime like this:
id | file | idx | values
----|-------|-------|----------------------
4 | 1 | 211 | 12,11,23
5 | 2 | 211 | 12,0,23
7 | 1 | 300 | 1
8 | 2 | 300 | 0
I just can’t wrap my head around this problem. I think it has something to do with INNER JOIN or OUTER JOIN.