Did {Amsterdam} {located in or next to body of water} {IJ}?
Is Amsterdam near a body of water?
Is Amsterdam located in or next to a body of water?
ASK WHERE { resource:Amsterdam property:located_in_or_next_to_body_of_water resource:IJ }
 ASK { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q727> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P206> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q338137>. } 
ASK WHERE { wd:Q727 wdt:P206 wd:Q338137 }