¶
1.5.56. How Do I Use NOT EXISTS in SPARQL Query?
Virtuoso supports "NOT EXISTS" SPARQL 1.1 feature. For example:
SQL> SPARQL SELECT COUNT(*) WHERE { ?s ?p "Novosibirsk" FILTER NOT EXISTS { ?s ?p "Новосибирск" } } callret-0 INTEGER 313 No. of rows in result: 1
This query is equivalent to the following query:
SQL> SPARQL SELECT COUNT(*) WHERE { { ?s ?p "Novosibirsk" } MINUS { ?s ?p "Новосибирск" } } callret-0 INTEGER 313 No. of rows in result: 1