What is {language used} of {Gibraltar} that is {has quality} is {second language} ?
Wich language is used as a second language in Gibraltar?
Which language is used in Gibraltar that has a quality of second language?
SELECT ?y WHERE { ?o property:language_used ?y . resource:Gibraltar property:language_used ?o . ?o property:has_quality resource:second_language }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1410> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P2936> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1552> <http://wikidata.dbpedia.org/resource/Q125421>
} 

SELECT ?obj WHERE { wd:Q1410 p:P2936 ?s . ?s ps:P2936 ?obj . ?s pq:P1552 wd:Q125421 }