Give me {fictional detective} that contains the word {sam} in their name
What is a fictional detective whose name contains the word sam?
what is fictional detective that contains the word sam in their name
SELECT DISTINCT ?q WHERE { FILTER ( CONTAINS ( LCASE ( ?q ) , 'sam' ) ) . ?q rdf:type ontology:fictional_detective }
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/Q3656924>. ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'sam')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25
SELECT DISTINCT ?sbj ?sbj_label WHERE { ?sbj wdt:P31 wd:Q3656924 . ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'sam')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25 
Sam Spade Sam Spade John Sampson John Sampson