Calculate cluster center in sql