Updated with SQL and Clustering