What is {follows} and {followed by} of {{Charlemagne} has {noble title} as {king of Lombards}}
Who does Charlemagne, the king of Lombards, follow? And who is he followed by
Who does Charlemagne, the king of Lombards, follow? And who is he followed by?
SELECT ?y ?q WHERE { ?r property:follows ?y . ?r property:noble_title resource:king_of_Lombards . resource:Charlemagne property:noble_title ?r . ?r property:followed_by ?q }
select distinct ?value1 ?value2 where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q3044> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P97> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q22997793>. ?statement <http://www.wikidata.org/entity/P580> ?value1 . ?statement <http://www.wikidata.org/entity/P2842> ?value2 } 
SELECT ?value1 ?value2 WHERE { wd:Q3044 p:P97 ?s . ?s ps:P97 wd:Q22997793 . ?s pq:P155 ?value1 . ?s pq:P156 ?value2 }