what is the {end time} for {Frederick II, Holy Roman Emperor} has {spouse} as {Isabella II of Jerusalem} ?
For {Holy Roman Emperor Fredrick II} what was the {end time} as {Isabella II of Jerusalem}
What is the { end time } for { Holy Roman Emperor Frederick II } as { Isabella II of Jerusalem }?
SELECT ?d WHERE { ?c property:end_time ?d . ?c property:spouse resource:Isabella_II_of_Jerusalem . resource:Frederick_II,_Holy_Roman_Emperor property:spouse ?c }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q130221> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q233809> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q130221 p:P26 ?s . ?s ps:P26 wd:Q233809 . ?s pq:P582 ?value}