After looking at information about some products, the consumer has a more specific idea what we wants, features the products should have and others that should not. The main contribution of this benchmark, compared to the previous ones, is the use of negation.
The corresponding query defines a product type, randomly selected from the product types class hierarchy at the leaf level, two different randomly selected product features that correspond to the chosen product type and two random numbers between 1 and 500.
"Look for products of type sheeny with product features stroboscopes but NOT gadgeteers, and productPropertyNumeric1 value greater than 300 and productPropertyNumeric3 smaller than 400".
Given the sample dataset bsbm-1000products, the product labels the user should obtain if restricted to the first 5 ordered alphabetically are:
"boozed", "elatedly fidelis release" and "learnable onomatopoeically".
SELECT ?product ?label
WHERE {
?product rdfs:label ?label .
?product a %ProductType% .
?product bsbm:productFeature %ProductFeature1% .
?product bsbm:productPropertyNumeric1 ?p1 .
FILTER ( ?p1 > %x% )
?product bsbm:productPropertyNumeric3 ?p3 .
FILTER (?p3 < %y% )
OPTIONAL {
?product bsbm:productFeature %ProductFeature2% .
?product rdfs:label ?testVar }
FILTER (!bound(?testVar))
}
ORDER BY ?label
LIMIT 5
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?product ?label
WHERE {
?product rdfs:label ?label .
?product a/rdfs:subClassOf? ?sheenyType .
?sheenyType rdfs:label "sheeny" .
?product bsbm:productFeature ?stroboscopes .
?stroboscopes rdfs:label "stroboscopes" .
?product bsbm:productPropertyNumeric1 ?p1 .
FILTER ( ?p1 > 300 )
?product bsbm:productPropertyNumeric3 ?p3 .
FILTER (?p3 < 400 )
OPTIONAL {
?product bsbm:productFeature ?gadgeteers .
?gadgeteers rdfs:label "gadgeteers" . }
FILTER (!bound(?gadgeteers))
}
ORDER BY ?label
LIMIT 5