I have a table which has 2 fields (latitude, longitude) and many other fields. I want to select the distinct combinations of latitude and longitude from this table.
What would be the query for that?
I have a table which has 2 fields (latitude, longitude) and many other fields. I want to select the distinct combinations of latitude and longitude from this table.
What would be the query for that?
SELECT COLUMN1,COLUMN2
FROM TABLE_NAME
GROUP BY COLUMN1,COLUMN2 -- This will fetch the unique combinations
-- During this kind of selection it is always better to give a where condition so that the results are filtered before grouping
Your Code:
SELECT Latitude, Longitude
FROM Coordinates
GROUP BY Latitude, Longitude