LAQRS Adds to Querying RDF in SPARQL (LAQRS)

LAQRS is an experimental set of extensions for SPARQL. The syntax and features may change at any time. LAQRS is pronounced like "lakers".

Rasqal 0.9.14 provides only syntax and API support for LAQRS.

Example:

PREFIX ex: <http://example.org/ex#>
EXPLAIN SELECT $number $name (3 + $number) AS foo COUNT(*) AS bar
FROM <data.rdf>
WHERE {
 $r a ex:Class ;
    ex:numPred $number ;
    ex:stringPred $name .
}
GROUP BY $name ORDER BY $number

TODO:

Delete Triples

DELETE ...

PREFIX ex: <http://example.org/ex#>
DELETE
FROM <data.rdf>
WHERE {
 $r a ex:Class ;
    ex:numPred $number ;
    ex:stringPred $name .
}

Explain Query

As a keyword allowed before any query.

Insert Triples

INSERT ...

SELECT Expressions

SELECT ... expression AS variable

SELECT $number $name (3 + $number) AS foo COUNT(*) AS bar
...

Aggregate functions in SELECT

SELECT COUNT(?c) AS x
WHERE { ?a ?b ?c }

SELECT ( COUNT(?c) ) AS x
WHERE { ?a ?b ?c }

SELECT COUNT(*) AS x
WHERE { ?a ?b ?c }

SELECT ( COUNT(*) ) AS x
WHERE { ?a ?b ?c }

Grouping of query results

GROUP BY order condition expression
such as using ASC(...) or DESC(...).

...
GROUP BY ASC($id) DESC($date)


Copyright (C) 2007 Dave Beckett