Multiple Triples - Part 2
If two triples contain the same subject, then we can shorten the triples by using a semicolon ;
after the first clause and omitting the subject in all subsequent triples that share a subject. Make sure that the final clause in the group is has a period . at the end.
For example:
WHERE {
?person fd:person/handle "jdoe";
fd:person/fullName ?fullName;
fd:person/favNums ?favNums.
}
If two triples contain the same subject and the same predicate, then we can shorten the triples by using a comma ,
after the first clause and omitting both the subject and predicate in all subsequent clauses that share both a subject and a predicate. Spacing, tabs, and new-lines do not effect the result of the query. In the examples, we write both objects on the same line for readability.
WHERE {
?person fd:person/handle "jdoe", "zsmith".
}