Scott,

Thanks for your reply. I did some research and found a fitting
solution. My near goal is accomplished by the following query: (find
people who follow more than one of the same forums)

SELECT DISTINCT ?person1 ?forum1
WHERE {
        ?person1 sioc:follows ?forum1 .
        {
                SELECT ?person2 ?forum1
                WHERE {
                        ?person2 sioc:follows ?forum1 .
                }
        }
        ?person1 sioc:follows ?forum2 .
        {
                SELECT ?person2 ?forum2
                WHERE {
                        ?person2 sioc:follows ?forum2 .
                }
        }
    FILTER (?forum1 != ?forum2) .
    FILTER (?person1 != ?person2) .
}


If you can simplify that query, that would be nice.

Also I'm looking for a way to capture the count. (ie tell me how many
of the same forums a pair of people follow).

On May 13, 5:31 pm, Scott Henninger <[email protected]>
wrote:
> Kevin; Not sure what is meant by "...where ?p1 and ?p2 are different
> ".  For your query to work, there needs to be a triples with an
> explicit owl:differentFrom property.
>
> The query you give should work, and is equivalent to the following
> (that has many advantages other than being simpler):
>
> SELECT ?p1 ?p2 ?f
> WHERE {
>         ?p1 sioc:follows ?f .
>         ?p2 sioc:follows ?f .
>         ?p1 owl:differentFrom ?p2 .
>
> }
>
> -- Scott
>
> On May 13, 1:41 pm, Kevin <[email protected]> wrote:
>
>
>
> > Running sparql in topbraid composer the following doesnt work:
>
> > SELECT ?p1 ?p2 ?f
> > WHERE {
> >         ?p1 sioc:follows ?f .
> >         {
> >                 SELECT ?p2 ?f
> >                 WHERE {
> >                         ?p2 sioc:follows ?f .
> >                 }
> >         }
> >   ?p1 owl:differentFrom ?p2 .
>
> > }
>
> > If I remove the line ?p1 owl:differentFrom ?p2 . it returns a list of
> > results include ones where ?p1 and ?p2 are different
>
> > --
> > You received this message because you are subscribed to the Google
> > Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> > To post to this group, send email to
> > [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/topbraid-users?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to