what is the {for work} for {Neil Gaiman} has {award received} as {Locus Award for Best Collection} ?
For which work did Neil Gaiman recieve Locus Award for Best Collection?
what is the work  for Neil Gaiman has award received as Locus Award for Best Collection?
SELECT ?r WHERE { ?z property:for_work ?r . ?z property:award_received resource:Locus_Award_for_Best_Collection . resource:Neil_Gaiman property:award_received ?z }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q210059> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P166> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q54824268> .
?statement <http://www.wikidata.org/entity/P1686> ?value. 
} 

SELECT ?value WHERE { wd:Q210059 p:P166 ?s . ?s ps:P166 wd:Q54824268 . ?s pq:P1686 ?value}