Cluster related data using an User Defined Aggregate
Read the realated article here:
https://www.linkedin.com/pulse/lateral-thinking-transitive-closure-clustering-sql-server-mauri/
The solution has been tested on SQL Server 2017 Windows and Linux. Since it just uses the UDA feature that is available from SQL Server 2005, I expect it to work also on all the previous SQL Server version, down to SQL Server 2005 included, but I haven't done any specific test. If you can test it on any version other then SQL Server 2017 please let me know so that I can update this readme accordingly. Thanks.