|Subject||Re: [firebird-support] Help needed with grouping, GROUP BY and LIST()|
Thank you for the pointer to CTE and the example.
Look at using Common Table Expressions (CTE)
Here is a rough sample based on your details
I have only looked at CTE briefly once before (for representing tree structures), so it will take me some time to do some reading and to dissect your example.