SELECT (1 AS ?x) WHERE { ?s ?p ?o OPTIONAL { ?s ?p ?x } }