0
试图写一个流利的查询来完成以下内容:查找为同一学生提供的服务,在同一日期但不同的代码。 SQL查询可能类似于:NHibernate查询查找具有一些相同的列和一个表中的一些不同的记录
select * from [Service] t1
where exists (
select
*
from [Service] t2
where
t1.StudentId = t2.StudentId and
t1.ServiceDate = t2.ServiceDate and
t1.ProcedureCodeId <> t2.ProcedureCodeId)