Skip to content

WatDiv SPARQL Statements

Introduction

(work-in-progress)

This work extends the C1 query supplied with the WatDiv Benchmark to add complexity and data update.

Multiple variations of the original query were created in order to include:

OPTIONAL, FILTER, BIND, CONTAINS, ORDER BY, LIMIT, CONCAT, INSERT and DELETE.

Queries

Query C1

SELECT ?v0 ?v4 ?v6 ?v7 WHERE {
    ?v0 sorg:caption        ?v1 .
    ?v0 sorg:text           ?v2 .
    ?v0 sorg:contentRating  ?v3 .
    ?v0 rev:hasReview       ?v4 .
    ?v4 rev:title           ?v5 .
    ?v4 rev:reviewer        ?v6 .
    ?v7 sorg:actor          ?v6 .
    ?v7 sorg:language       ?v8 .
}

Variation 1

SELECT (COUNT(*) AS ?count) WHERE { ?s ?p ?o }

Variation 2

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
}

Variation 3

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    FILTER (?v3="12")
}
ORDER BY DESC(?v1)
LIMIT 200

Variation 4

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    FILTER (CONTAINS(?v2, "reposing ") || ?v3!="12")
} 
ORDER BY DESC(?v1)
LIMIT 200

Variation 5

DELETE {
    ?v0 <http://schema.org/text> ?v2 .
}
INSERT {
    ?v0 <http://schema.org/text> ?newV2 .
}
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    BIND(CONCAT("TEST :", ?v2) as ?newV2)
}

Variation 6

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    BIND(CONCAT("TEST ", ?v2) as ?newV2)
} 

Variation 7

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    FILTER (CONTAINS(?v2, "TEST "))
}
ORDER BY ASC(?v3)
LIMIT 200

Variation 8

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    FILTER (CONTAINS(?v2, "reposing "))
} 
ORDER BY DESC(?v1)
LIMIT 200

Variation 9

SELECT *
WHERE {
    ?v0 <http://schema.org/caption> ?v1 .
    ?v0 <http://schema.org/text> ?v2 .
    ?v0 <http://schema.org/contentRating> ?v3 .
    ?v0 <http://purl.org/stuff/rev#hasReview> ?v4 .
    ?v4 <http://purl.org/stuff/rev#title> ?v5 .
    ?v4 <http://purl.org/stuff/rev#reviewer> ?v6 .
    OPTIONAL { ?v7 <http://schema.org/actor> ?v6 . }
    OPTIONAL { ?v7 <http://schema.org/language> ?v8 . }
    FILTER (?v3="6")
} 
ORDER BY DESC(?v1)
LIMIT 200

G?v0?v0?v2?v2?v0->?v2sorg:text?v1?v1?v0->?v1sorg:caption?v3?v3?v0->?v3sorg:contentRating?v4?v4?v0->?v4sorg:hasReview?v5?v5?v4->?v5rev:title?v6?v6?v4->?v6rev:reviewer?v7?v7?v7->?v6sorg:actor?v8?v8?v7->?v8sorg:language