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的单条记录