Списък населени места


Немога да изпълня заявката: SELECT trim(substring_index(place,',',-1)) as myplace, count(place) as placecount FROM tng_places WHERE trim(substring_index(place,',',-1)) != "" AND gedcom = "0000001" GROUP BY myplace ORDER by placecount DESC LIMIT 30