Here is an example for #4
First you need to look at the Ontology Class of City in DbPedia.
city is described as city
Select distinct ?city ?location 
Where 
{
   ?city a dbo:City.
   ?city dbo:location ?location.
} 
LIMIT 100
Then you can the filter clause to get the city you want.
solved Sparql queries Sparql queries