Sql 查询到 EF Linq 表达式
任何人都可以帮助这个 sql 查询将其转换为 EF Linq 表达式吗?
SELECT Aitimata.id, AST.dateCr, AST.StatusId, Aitimata.UniqueCode, Aitimata.CategoryId, Aitimata.Thema
FROM Aitimata INNER JOIN
(select a.* from AitimataStatus a join
(select AitimaId, max(dateCr) AS dateCr
from AitimataStatus
group by AitimaId) b
on a.AitimaId = b.AitimaId and a.dateCr = b.dateCr)as AST ON Aitimata.id = AST.AitimaId
重要的是这个子查询
select a.* from AitimataStatus a join
(select AitimaId, max(dateCr) AS dateCr
from AitimataStatus
group by AitimaId) b
on a.AitimaId = b.AitimaId and a.dateCr = b.dateCr
您需要额外的信息吗?
谢谢
Can anybody help with this sql Query to tranform it to EF Linq Expression?
SELECT Aitimata.id, AST.dateCr, AST.StatusId, Aitimata.UniqueCode, Aitimata.CategoryId, Aitimata.Thema
FROM Aitimata INNER JOIN
(select a.* from AitimataStatus a join
(select AitimaId, max(dateCr) AS dateCr
from AitimataStatus
group by AitimaId) b
on a.AitimaId = b.AitimaId and a.dateCr = b.dateCr)as AST ON Aitimata.id = AST.AitimaId
The important is this subquery
select a.* from AitimataStatus a join
(select AitimaId, max(dateCr) AS dateCr
from AitimataStatus
group by AitimaId) b
on a.AitimaId = b.AitimaId and a.dateCr = b.dateCr
you need extra info?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它会是这样的:
It'll be something like this:
这是我的解决
方案
。
Here is my solution
it produce
.