【发布时间】:2015-06-26 16:31:06
【问题描述】:
如何使用 Criteria 编写以下 SQL:
select b.Name as Batch, b.Capacity as Capecity,
a.tStudent as Admit, (b.Capacity-a.tStudent) as Availabe
from (
SELECT count(Id) as tStudent, BatchId FROM [dbo].[Student] group by BatchId) as a
left join [dbo].[Batch] as b on a.BatchId = b.Id
【问题讨论】:
标签: sql nhibernate criteria nhibernate-criteria