Finding Nearest Neighbors in SQL (www.periscopedata.com)