I have the table like below: Here one sample 69672 is compared to itself and the other 2 samples all the 3 of which have original sample = 69672.
My query for the above is:
<code>select distinct
s2.SAMPLE_NUMBER as DupSamp1
,s1.SAMPLE_NUMBER as OrigSamp
from SAMPLE s1
join SAMPLE s2 on s1.ORIGINAL_SAMPLE = s2.ORIGINAL_SAMPLE
where
s1.ORIGINAL_SAMPLE = 69672
</code>
<code>select distinct
s2.SAMPLE_NUMBER as DupSamp1
,s1.SAMPLE_NUMBER as OrigSamp
from SAMPLE s1
join SAMPLE s2 on s1.ORIGINAL_SAMPLE = s2.ORIGINAL_SAMPLE
where
s1.ORIGINAL_SAMPLE = 69672
</code>
select distinct
s2.SAMPLE_NUMBER as DupSamp1
,s1.SAMPLE_NUMBER as OrigSamp
from SAMPLE s1
join SAMPLE s2 on s1.ORIGINAL_SAMPLE = s2.ORIGINAL_SAMPLE
where
s1.ORIGINAL_SAMPLE = 69672
I want the following output: so that each sample can compare with the other sample based on the field called original sample.
Thanks and Regards