 <p>This is just another version of <a href="http://stackoverflow.com/questions/5257451/sql-logical-compression-of-records/5258626#5258626">Tom Morgan's</a> accepted answer. It uses division instead of substring to trim the least significant digit off the BIGINT digit column:</p> <pre><code>SELECT t.Digit/10 ( -- Foreach t, get the Source character that is most abundant (statistical mode). SELECT TOP 1 Source FROM table i WHERE (i.Digit/10) = (t.Digit/10) GROUP BY i.Source ORDER BY COUNT(*) DESC ) FROM table t GROUP BY t.Digit/10 HAVING COUNT(*) = 10 </code></pre> <p>I think it'll be faster, but you should test it and see. </p>