On 04/06/14 14:34, Mark Feblowitz wrote:
Em… So sorry. As you might have guessed, I had a late-night brain glitch in 
anonymizing the code. I can simplify this by eliminating the distracting 
separate namespaces. With that simplification, it should have read:

SELECT DISTINCT ?O ?T  ?E
WHERE{
?E a :E.
        { SELECT ?O ?T
                  WHERE {
                        ?O :oE ?E;

Different ?E

SELECT ?O ?T hides the inner ?E so it never meet up with the "?E a :E."

You could call it anything and it makes no difference to the query unless it's in the SELECT.


                                :oT ?T .
                        } ORDER BY DESC(?T)
                          LIMIT 3
                }
        }

In this way I had planned for each ?E to be paired with the much
more
limited case where ?E is linked to ?O. So, in the worst case, the result
would be 3 O’s per E, or 3 * 7273 = 21819. I expect much less, although
there are other issues with the numbers that I have to look at.

Perhaps I don’t have a proper understanding of the connectivity. Is
it
the case that for the nested query I need to have ?E in the Select in
order to have the embedded ?E bound to (and constraining/constrained by)
the outer ?E ? I’ll try that, as it is what I had intended (and not
unconnected cross products).

Yes.


In my looking I could not find much that explains some of these
somewhat subtle nuances regarding nested SPARQL queries. Is there a
definitive and informative set of examples and explanations for me to
wrap my head around?

Thanks again,

Mark

Reply via email to