| 1 |
# Get names of people, together with the names of people they know. |
| 2 |
|
| 3 |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> |
| 4 |
|
| 5 |
SELECT ?name ?name2 |
| 6 |
WHERE |
| 7 |
{ ?person foaf:name ?name . |
| 8 |
OPTIONAL { |
| 9 |
?person foaf:knows ?p2 . |
| 10 |
?p2 foaf:name ?name2 . |
| 11 |
} |
| 12 |
} |
| 13 |
|
| 14 |
|