pankajdaga
Programmer
Hi everyone again,
I am stuck again. SQL really is not my thing :-( Consider the following table again:
ID TESTNUMBER STATE VALUE
1 100 1 0
2 100 1 1
3 100 2 1
4 100 2 0
5 101 1 1
6 101 1 0
7 101 2 1
8 101 2 0
9 103 1 1
10 103 3 1
Now, I have to get all TESTNUMBER which have different sets of State and Values. So, this table will return 2 sets...
Set 1:
1 0
1 1
2 0
2 1
(Since, 100 and 101 share a common set)
Set 2:
1 1
3 1
(102 does have an identical set as 100 and 101. Common items are allowed but the sets must be identical (same elements))
Any suggestions on how to achieve this?
Thanks a lot,
Pankaj
I am stuck again. SQL really is not my thing :-( Consider the following table again:
ID TESTNUMBER STATE VALUE
1 100 1 0
2 100 1 1
3 100 2 1
4 100 2 0
5 101 1 1
6 101 1 0
7 101 2 1
8 101 2 0
9 103 1 1
10 103 3 1
Now, I have to get all TESTNUMBER which have different sets of State and Values. So, this table will return 2 sets...
Set 1:
1 0
1 1
2 0
2 1
(Since, 100 and 101 share a common set)
Set 2:
1 1
3 1
(102 does have an identical set as 100 and 101. Common items are allowed but the sets must be identical (same elements))
Any suggestions on how to achieve this?
Thanks a lot,
Pankaj