Blog Tag Search

You searched the blog entries for the tag equivalence.

Finding equivalent elements in SQL (regrouping)

16th January 2013

Graph of equivalent elements

Regrouping is something that I've had to do many times during my career in data analytics, unfortunately a lot of relationships aren't defined through a single unique identifier, at least not at first. This code snippet is designed to flush out the transitive relationships defined between pairs of elements and assign all elements in the graph a single unique identifier. Get ready for some SQL looping action...