Reputation: 5
I have one table in which there are many records, now I need to fetch master record and potential match records from my column match result which having same groupid on the basis of it's top parented.
Upvotes: 1
Views: 26
Reputation: 2507
You probably just want something like
select *
from [table] as master
inner join [table] as match on master.groupid = match.groupid
where master.match_result = 'Master Record'
and match.match_result = 'Potential Match'
Upvotes: 1