Hi All,

I have been trying to construct the below query using Jena query builder. I 
have tried multiple different ways to build it, nothing seems to work. Adding 
values block inside Graph seems to be not possible. We are using Jena 3.5.


SELECT ?subject ?predicate ?object ?graph
WHERE {

{
  GRAPH <G1> {
    ?subject ?predicate ?object

      VALUES (?subject ?predicate ?object) {
      (<S1> <P1> <O1>)
      (<S2> <P2> <O2>)
      (<S3> <P3> <O3>)
     }

    BIND(<G1> AS ?graph)
  }
}

UNION

{
  GRAPH <G2> {
    ?subject ?predicate ?object

      VALUES (?subject ?predicate ?object) {
      (<S4> <P4> <O4>)
      (<S5> <P4> <O5>)
      (<S6> <P4> <O6>)
   }

    BIND(<G2> AS ?graph)
  }
}

Can anyone suggest on how this can be done ? Any help is appreciated 😊


Thanks
Kishan Dhamotharan

Reply via email to