我在下面的SQL转换的LINQ to SQL很大的麻烦,任何一个能够帮帮忙?
SELECT dbo.ExpensesGroup.ExpenseGroupId, dbo.ExpensesGroup.Title, SUM(dbo.Expenses.Amount) AS TotalAmount, MAX(dbo.Expenses.DateLastTickled)
AS LastTickledDate, MAX(dbo.ExpensesGroup.DateTime) AS Date, Username
FROM dbo.Expenses INNER JOIN
dbo.ExpensesGroup ON dbo.Expenses.ExpenseId = dbo.ExpensesGroup.ExpensesId
WHERE dbo.Expenses.Status = 'AwaitingApproval' or dbo.Expenses.Status = 'AwaitingApprovelGrouping'
GROUP BY dbo.ExpensesGroup.ExpenseGroupId, dbo.ExpensesGroup.Title, dbo.Expenses.Username
ORDER BY MAX(dbo.ExpensesGroup.DateTime) DESC, dbo.ExpensesGroup.Title
甚至更好的人知道一个自动的SQL LINQ转换器的?