Questions tagged [hierarchical-grouping]
4 questions
4
votes
3 answers
How do I write a LINQ query that inverts the grouping of a hierarchical data source?
How would one write a LINQ query which takes a hierarchical source data and transforms it so that the grouping is inverted?
Say I have a list of Topic objects each of which contains a collection of Tags which represent meta-data tags on that topic.…

jpierson
- 16,435
- 14
- 105
- 149
2
votes
5 answers
Nested grouping strategy/algorithm c#
Not sure if I have to correct label for this type of problem, but do you have any thoughts on a generic solution for the following?
Given a collection of Invoices:
var invoices = new List()
{
new Invoice() { Id = 1, Customer = "a", Date =…

Dane O'Connor
- 75,180
- 37
- 119
- 173
1
vote
0 answers
Cascading Report via Hierarchical Grouping or Subqueries
I have a table called 'Materials' (SQL Server 2012) that has two columns (among others) called PartNo and SubPartNo. This table contains all the parts required to build various assemblies.
For example...
Material Table Example
A PartNo contains at…

highrise955
- 11
- 2
0
votes
1 answer
Generating a two level hiearchy from a set of data with more then one common grouping field in sql
My database is MS SQL 2008.
I"m basically merging some sets of data together from two or more databases to end up with one owner of a set of data possibly related by two fields.
Table
ID Name Code
1 Ben 1
2 Ben 1
3 …

Ben Dempsey
- 360
- 1
- 6