$sSQL .= "group by osm_type,osm_id,class,type,admin_level,rank_search,rank_address,calculated_country_code,importance";
if (!$bDeDupe) $sSQL .= ",place_id";
$sSQL .= ",get_address_by_language(place_id, $sLanguagePrefArraySQL) ";
$sSQL .= ",get_name_by_language(name, $sLanguagePrefArraySQL) ";
$sSQL .= ",get_name_by_language(name, ARRAY['ref']) ";
$sSQL .= "group by osm_type,osm_id,class,type,admin_level,rank_search,rank_address,calculated_country_code,importance";
if (!$bDeDupe) $sSQL .= ",place_id";
$sSQL .= ",get_address_by_language(place_id, $sLanguagePrefArraySQL) ";
$sSQL .= ",get_name_by_language(name, $sLanguagePrefArraySQL) ";
$sSQL .= ",get_name_by_language(name, ARRAY['ref']) ";