WITH EventsCTE(loc_name,x_coord, y_coord, Ranking) AS(SELECT loc_name,x_coord, y_coord, Ranking =DENSE_RANK() OVER(PARTITIONBY x_coord, y_coord ORDERBYNEWID()ASC) FROM dbo.tbl_locations )Select*FROM EventsCTE WHERE Ranking > 1 and x_coord isnotnull
SELECT col1,count(col1) cnt FROM tab1 GROUP BY col1 HAVING count(col1) > 1
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.