I have a table of locations with latitude, longitude and the U.S. state fields. I would like to select the average latitude and longitude for each state.
I am trying the following code but I get a syntax error on distinct.
select avg(lat), avg(lon), distinct(state) from tRealtyTrac order by state group by state