I have the following RDF structure that I cannot change:
Multiple Assignments can be associated to each employee (Manager). The output I'd like would be (including the word "in" and "&):
Employee Name | Assignment
Name 1 | Assignment1 in Location1 & Assignment2 in Location2 &....
Name 2 | Assignment1 in Location2 & Assignment3 in Location1 &....
Is there a way to do this in Sparql
?
This is what I have so far:
select ?name group_concat(DISTINCT ?description; separator("&"))
where
{
?employee :hasName ?name
{
select concat(?name, "In", ?location)
?employee ^:hasManager/:hasAsstName ?name
?employee ^:hasManager/:hasLocation ?location
}
}
This gives me empty employee name and lots of ?Descriptions. It does not seem to reflect what I was expecting.