Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from u in Users
- join l in Languages on u.LanguageId equals l.Id
- group u by l.Name into g
- orderby g.Count() descending
- select new { Id = l.Id, NameAndCount = g.Key + " (" + g.Count() + ")" }
- from u in Users
- join l in Languages on u.LanguageId equals l.Id
- group l by l.Id into g
- orderby g.Count() descending
- select new { Id = g.Key, NameAndCount = g.First().Name + " (" + g.Count() + ")" }
Add Comment
Please, Sign In to add comment