sql
52207Feb 5 2007 — edited Feb 6 2007scenario where need to find records where a particular id has 2 rows for code='X' and one row for code='Y' combined together.
So from the following data, only id 1 should be returned.
ID CODE
-------
1 X
1 X
1 Y
2 X
2 Y
3 X
3 X
3 Y
3 Y
4 X
4 X
5 Y
5 Y