IOT Virtual Conference - Register now to book your ticket and get updates
x
CONGRATULATIONS! C# Corner Q1, 2021 MVPs Announced
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forumguidelines
Roelof
2k
18
148
How to find the max after I found a total of the amount
Apr 15 2020 7:05 AM
Hello,
I have this method :
public void MaxMoneySoldInaHour(List<Transaction> transactions)
{
var answer = transactions.
GroupBy(i => i.TimeWhenSold.Hour).
Select(group => new { Hour = group.Key, Count = group.Sum(i => i.TotalPrice)}).
ToList();
//TransactionCVSParser.WriteOutComeMoney(answer);
}
}
but I try to find the max of the sum calculated by the select.
How can I make that work ?
Roelof
Reply
Answers (
3
)
select value from row-1 MS SQL
Create role base login with permission edit update delete