Manish Prajapat
Manish Prajapat

Reputation: 5

I need to fetch master record and potential match from the column match result in my table which having same groupid

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.

enter image description here

Upvotes: 1

Views: 26

Answers (1)

James Casey
James Casey

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

Related Questions