SPARQL Example 2

LIMIT 사용

PREFIX test: <http://test.com/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?id ?name
WHERE {
?id rdf:type test:Author ;
foaf:name ?name ;
test:birthYear ?birth .
FILTER(?birth=1933)
}
ORDER BY DESC (?id)
LIMIT 10

 

OFFSET 사용

PREFIX test: <http://test.com/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?id ?name
WHERE {
?id rdf:type test:Author ;
foaf:name ?name ;
test:birthYear ?birth .
FILTER(?birth=1933)
}
ORDER BY DESC (?id)
LIMIT 10
OFFSET 100

 

QUERY 유형

PREFIX
SELECT / CONSTRUCT / ASK / DESCRIBE
(DISTINCT / REDUCED)
FROM (NAMED)
WHERE
Graph Pattern / OPTIONAL / FILTER / UNION / GRAPH
ORDER BY
LIMIT
OFFSET

 

more …