PREFIX : PREFIX rdf: PREFIX xsd: SELECT ?s WHERE { ?s :p ?v . FILTER(datatype(xsd:boolean(?v)) = xsd:boolean) . }