Convert this SQL Query into LINQ (OVER (PARTITION BY Date))
Posted
by
user1106649
on Stack Overflow
See other posts from Stack Overflow
or by user1106649
Published on 2012-06-30T21:10:50Z
Indexed on
2012/06/30
21:15 UTC
Read the original article
Hit count: 185
Here's the query i'm trying to convert into Linq:
SELECT R.Code,
R.FlightNumber,
S.[Date],
S.Station,
R.Liters,
SUM(R.Liters) OVER (PARTITION BY Year([Date]), Month([Date]), Day([Date])) AS Total_Liters
FROM S INNER JOIN
R ON S.ID = R.SID
WHERE (R.Code = 'AC')
AND FlightNumber = '124'
GROUP BY Station, Code, FlightNumber, [Date], Liter
ORDER BY R.FlightNumber, [Date]
Thanks for any help.
© Stack Overflow or respective owner