To download the examples and install arq:
make installThen, you should be able to run a query as shown on page 5 of Learning SPARQL.
arq --data ex002.ttl --query ex003.rqNote that every example in Learning SPARQL has a filename specified as a comment at the top, like this:
# filename: ex008.rq