view sparql-7785ad38967f/sparql/sparql/test/dawg/data-r2/optional/q-opt-complex-4.rq @ 0:46996d3b1cfb default tip

Uploaded
author greg
date Tue, 13 Mar 2012 16:29:09 -0400
parents
children
line wrap: on
line source

PREFIX  foaf:   <http://xmlns.com/foaf/0.1/>
PREFIX    ex:   <http://example.org/things#>
SELECT ?name ?plan ?dept ?img 
WHERE 
{ 
    ?person foaf:name ?name  
    { ?person ex:healthplan ?plan } UNION { ?person ex:department ?dept } 
    OPTIONAL { 
        ?person a foaf:Person
        GRAPH ?g { 
            [] foaf:name ?name;
               foaf:depiction ?img 
        } 
    } 
}