I'm trying to make a system where user can for example write name of the city, like Berlin and maybe he wants to get its population. So, i could not know what certain city he wants so here is a problem that i can't use certain code that (for example) Berlin has.
Like in a simple situation i think i could use this code, where code Q64 is Berlin
SELECT ?population
WHERE {
wd:Q64 wdt:P1082 ?population
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
But what if i dont know the code of Berlin, how can i find the correct city just by name? I know that sparql can filter years, another numbers but what about strings?