SELECT * FROM [workflow_thread_progress_table] WHERE ([people]=@peopleType AND [complitionStatus]='FALSE' AND [isOpen]='TRUE' AND [isClosed]='FALSE' AND [peopleID]=@peopleID) OR ([people]=@peopleType AND [complitionStatus]='FALSE' AND [isOpen]='TRUE' AND [isClosed]='FALSE' AND [peopleID] in (Select [delegatedBy] from [User_Delegation_Table] where delegatedTo=@peopleID AND IsEnabled=1 AND Convert(varchar(30),[del_from],102)<=GETDATE() AND Convert(varchar(30),[del_to],102)>=GETDATE())) order by [SLNO] desc
Этот запрос извлекает несколько записей с одинаковым идентификатором workFlowID, но я хочу одну запись с одинаковым идентификатором workFlowID