Debian Codegraph @

Tests/lubm-univ-bench-sparql-load-and-complex-query-rasqal-test.sparql

raw
1 # requires Konclude compliled with Redland RDF Libraries since these files are serialized with RDF Turtle and the query uses complex constructs which have to be processed with Redland RASQAL
2 LOAD <file:Tests/lubm-univ-bench.owl.xml>
3 LOAD <file:Tests/lubm-univ-bench-data-1.ttl>
4
5
6 # remove the comment symbol of the following line to ensure that Konclude preprocessed the ontology such that query processing can directly be started (otherwise Konclude will preprocess the ontology lazily for the first query)
7 #PREPARE
8
9
10
11 # modified LUBM Query9
12 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
13 PREFIX ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
14 SELECT DISTINCT ?X ?name ?courseCount
15 WHERE
16 {
17 {
18 ?X rdf:type ub:GraduateStudent .
19 } UNION {
20 ?X rdf:type ub:UndergraduateStudent .
21 }
22
23
24 {
25 ?X ub:advisor ?Y .
26 ?Y rdf:type ub:Faculty .
27 ?Y ub:teacherOf ?Z .
28 ?Z rdf:type ub:Course .
29 ?X ub:takesCourse ?Z .
30 } OPTIONAL {
31 ?X ub:name ?name .
32 } OPTIONAL {
33 SELECT ?X (COUNT(?c) as ?courseCount) {
34 ?X ub:takesCourse ?c .
35 } GROUP BY ?X
36 }
37
38 } LIMIT 10