.fromNamed("http://example.org/people", new where() {
{
select("SUM(?book) as ?totalAmountOfBooks",
new where() {
{
$(new group() {
{
$("?book rdf:type <Book>");
}
}).union(new group() {
{
$("?book rdf:type <Magazine>");
}
});
}
});
$(new group() {
{
$("?author <hasWritten> ?book");
}
}).union(new group() {
{
$("?author <hasContributedTo> ?book ");
}
});