What is {user} of {theme} of {Gingerbread Man} ?
Who gave the{user} of {subject} of {Gingerbread Man} ?
Who gave the{user} of {theme} of {Gingerbread Man} ?
SELECT ?b WHERE { ?i property:used_by ?b . resource:Gingerbread_Man property:based_on ?i }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q15233326> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P144>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?X . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?X. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1535> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q15233326 wdt:P144 ?X . ?X wdt:P1535 ?answer}