- From: Rich Morin <rdm@cfcl.com>
- Date: Fri, 13 Jan 2012 11:38:25 -0800
- To: public-sparql-dev@w3.org
I'm trying to work up some example queries for a project related to RubyGems (archives of Open Source Ruby code). I'm not at all sure how to code a query such as: What Gems were written by all of the same authors? That is, if this Gem was written by Alice and Bob, I want to find others that were also written only by these two. Here is some total science fiction I wrote: SELECT DISTINCT ?gem ORDER BY ?gem WHERE { { SELECT DISTINCT ?author AS ?set_1 WHERE { item:foo-1.2.3-x86 spec:author ?author . } } { SELECT DISTINCT ?author AS ?set_2 WHERE { ?gem spec:author ?author . } } } FILTER(?set_1 = ?set_2) Is this approximately on the right track? Any suggestions or other clues? -r P.S. It would also be nice to answer a related question: What Gems were written by at least the same authors? That is, if this Gem was written by Alice and Bob, I want to find others that were also written by them (and possibly others). -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation
Received on Friday, 13 January 2012 19:43:25 UTC