我有一个 SQL 查询,我应该在实体框架中使用它。我是 Entity 的新手,我不知道该怎么做。我的查询是:
SELECT EKIP,
COUNT (SAGLA) AS KPISAYISI
FROM
(SELECT M.APPLICATIONID AS ORTAM,
MNAME AS SERVIS,
sum(AVAIL*HIT)/SUM(HIT) AS SAGLA,
SUM(HIT) AS CAGRI ,
(SELECT DOMAINNAME
FROM SOAGOVERNANCE_SERVICE D
WHERE D.NAME=m.MNAME
AND D.APPLICATIONID=m.APPLICATIONID) AS EKIP
FROM SOAGOVERNANCE_METRICLOG m
WHERE MDATE BETWEEN '2013-01-01 01:00:00' AND '2013-02-01 01:00:00'
AND MTYPE='SERVICE'
GROUP BY APPLICATIONID,
MNAME) S
WHERE S.CAGRI > 3
AND S.SAGLA<90
GROUP BY EKIP
ORDER BY EKIP