score:3
Accepted answer
after reading this (also with more information on this topic):
i come up with:
dim items = from item in db.items _
group item by catid = item.catid into group select catid, _
yeargroups = from y in group _
group y by yearkey = y.pubdate.value.year into yeargroup = group _
select year = yearkey, _
monthgroups = from m in yeargroup _
group m by monthkey = m.pubdate.value.month into monthgroup = group _
select month = monthkey, monthitems = monthgroup
Source: stackoverflow.com
Related Query
- LINQ Source Code Available
- c# linq nested "conditional/composite" grouping
- Multiple Nested Grouping in Linq
- creating Linq to sqlite dbml from DbLinq source code
- Linq Nested Grouping
- Linq grouping and nested grouping
- nested Grouping in Linq
- replace 3 levels of nested for loops by efficient code possibly linq
- source code for LINQ 101 samples
- LINQ Nested Grouping - I don't understand the MSDN example
- Grouping Deeply Nested Objects Using LINQ
- LINQ grouping multiple columns with nested collection
- Linq query for a nested select statement with grouping and distinct
- Please explain LINQ nested grouping
- Nested Linq in EF code first
- How do you create a nested LINQ Grouping / Lookups for a Collection of Objects
- c# Linq or code to extract groups from a single list of source data
- LINQ nested grouping with multiple collections
- What would be the Linq code for this grouping using VB.NET 2008?
- Convert string[] to int[] in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- EF LINQ include multiple and nested entities
- How to flatten nested objects with linq expression
- Linq code to select one item
- Why does the C# compiler go mad on this nested LINQ query?
- How are people unit testing code that uses Linq to SQL
- linq question: querying nested collections
- How to include() nested child entity in linq
- Linq - Grouping by date and selecting count
- Nested Group by LINQ
More Query from same tag
- Select case in LINQ
- LINQ Query Help
- The Include path expression must refer to a navigation property defined on the type.
- Convert DataTable to Generic List in C#
- Use generics to make a method work for any data type
- C# Mapping a Calculated Column with Linq
- c# linq group by a datetime to the nearest second
- Manage errors while Linq query iteration
- Linq Multiple references to a foreign key relationship in a string concatenation
- LINQ SQL join multiple n-to-n relations and filter
- Issue with Linq query in c#
- Linq c# use between on time span
- Adding existing models to many-to-many relationship with Entity Framework 5
- How to place every child node from a specific parent node into its own parent node
- Linq to object: ToList can not convert to generic list
- Parse string and order by parsed value
- Select first record of a column using LINQ ASP.NET
- Static ObservableCollection Event is not firing
- How to convert a string to decimal in a LINQ query
- Pimp my LINQ: a learning exercise based upon another post
- What is the equivalent of this SQL statement in Linq?
- How to order application settings
- Linq extract a count() value from a data object
- How to use LINQ to find a duplicate object
- LINQ to Entities Any() and Contains() slow with small list
- orderby in foreach loop loosing scope
- How do I find available rooms using LINQ, when there are more than one of each room type?
- Linq Joins only working when all tables have data
- how to use linq table as parameter?
- Getting information from two tables that are in relation