Simple Anomaly Detection Using Plain SQL
A nice trick to detect anomalies in an array of arbitrary data is to make N subarrays (each with different size(array)/N elements removed) and compress each of them.<p>The subarray that compresses the most has the anomaly removed.<p>It's not very cheap, but it's much more general than median or average or string comparisons. It relies on the fact that compressed size is estimate of Kolmogorov complexity.