← every query · class 09 · queries/large-orders.rq
Large orders, as a FILTER — outside OWL 2 RL
The same answer in both regimes: this query asks only for what was written.
| ?order | ?totalCents |
|---|---|
| order:1001 | "52000"^^xsd:integer |
The query
# The SPARQL equivalent of the defined class onto:LargeOrder.
# Useful because the OWL 2 RL profile does not cover datatype restrictions:
# with owlrl the classification never appears; this query answers anyway.
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX onto: <https://data.csoares.me/onto#>
SELECT ?order ?totalCents
WHERE {
?order a onto:Order ;
onto:totalCents ?totalCents .
# 50000 cents = 500 euros, the threshold in the class definition
FILTER (?totalCents >= 50000)
}
ORDER BY DESC(?totalCents)