I have a table with some data:
id month price
100 May 2000
100 June 3000
100 July 2500
192 March 2000
192 May 2000
101 May 2000
101 June 3000
100 August 3100
I need to get the ids, by using only INTERCEPT.
1) If the "id" has month "May" and price "2000", and the same "id" also has month "June" and price "3000". Example: 100, 101 have "May=2000" and "June=3000"
I need to get the ids, by using only EXCEPT.
2) If the "id" has month "May" and price "2000", but the same "id" does not have month "June" and price "3000"
Example: 192 has "May=2000" but not "June=3000"
Please don't use IN.