Give me {security agency} that {chairperson} {Yuri Andropov} and which contains the word {kgb} in their name
Let me know the security office of chairperson Yuri Andropov that contains the word kgb in it's title?
Tell me the security agency of chairperson Yuri Andropov that contains the word kgb in it's name?
SELECT DISTINCT ?q WHERE { ?q property:chairperson resource:Yuri_Andropov . FILTER ( CONTAINS ( LCASE ( ?q ) , 'kgb' ) ) . ?q rdf:type ontology:security_agency }
SELECT DISTINCT ?sbj ?sbj_label { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sbj . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P31> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q3238445>. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sbj . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P488> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q44071>. ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'kgb')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25
SELECT DISTINCT ?sbj ?sbj_label WHERE { ?sbj wdt:P31 wd:Q3238445 . ?sbj wdt:P488 wd:Q44071 . ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'kgb')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25 
KGB KGB