Give me {security agency} that contains the word {state} in their name
Let me know security office whose title has the word state in it.
Tell me  security agency whose name has the word state in it.
SELECT DISTINCT ?e WHERE { ?e rdf:type ontology:security_agency . FILTER ( CONTAINS ( LCASE ( ?e ) , 'state' ) ) }
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>. ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'state')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25
SELECT DISTINCT ?sbj ?sbj_label WHERE { ?sbj wdt:P31 wd:Q3238445 . ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'state')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25 
Ministry of State Security of the People's Republic of China Ministry of State Security of the People's Republic of China State Security Investigations Service State Security Investigations Service Special State Protection Service Special State Protection Service State Security Administration State Security Administration United States Army Security Agency United States Army Security Agency Committee for State Security of the Latvian Soviet Socialist Republic Committee for State Security of the Latvian Soviet Socialist Republic State Investigation and Protection Agency State Investigation and Protection Agency Belgian State Security Service Belgian State Security Service State Security Presidium State Security Presidium