random example


SELECT ?d1 ?key1 ?keytype ?d2 ?key2 ?keytype2
 WHERE { $t1 <term.name> "mitochondrial genome maintenance" . 
         ?t1 <term_definition.term_definition> $d1 .
         ?t1 <term_dbxref.dbxref_id> ?dbx1 .
         ?dbx1 <dbxref.xref_key> ?key1 .
         ?dbx1 <dbxref.xref_dbname> ?keytype .
         ?tt <term2term.term1_id> ?t1 .
         ?tt <term2term.term2_id> ?t2 .
         ?t2 <term_definition.term_definition> $d2 .
         ?t2 <term_dbxref.dbxref_id> ?dbx2 .
         ?dbx2 <dbxref.xref_key> ?key2 .
         ?dbx1 <dbxref.xref_dbname> ?keytype2
         FILTER (?d1 != ?d2) } LIMIT 10;

partially decompiled into SQL

FROM term AS term_0
  term_0.<pk> AS "t1"
WHERE term_0.name="mitochondrial genome maintenance"
FROM term_definition AS term_definition_0
 ON term_0.<pk> = term_definition_0.<pk>
  term_definition_0.<pk> AS "t1"
  term_definition_0.term_definition AS "d1"
FROM term_dbxref AS term_dbxref_0
 ON term_definition_0.<pk> = term_dbxref_0.<pk>
  term_dbxref_0.<pk> AS "t1"
  term_dbxref_0.dbxref_id AS "dbx1"
FROM dbxref AS dbxref_0
 ON term_dbxref_0.dbxref_id = dbxref_0.<pk>
  dbxref_0.<pk> AS "dbx1"
  dbxref_0.xref_key AS "key1"
  dbxref_0.xref_dbname AS "keytype"
FROM term2term AS term2term_0
  term2term_0.<pk> AS "tt"
 ON term_dbxref_0.<pk> = term2term_0.term1_id
  term2term_0.term2_id AS "t2"
FROM term_definition AS term_definition_1
 ON term2term_0.term2_id = term_definition_1.<pk>
  term_definition_1.<pk> AS "t2"
  term_definition_1.term_definition AS "d2"
FROM term_dbxref AS term_dbxref_1
 ON term_definition_1.<pk> = term_dbxref_1.<pk>
  term_dbxref_1.<pk> AS "t2"
  term_dbxref_1.dbxref_id AS "dbx2"
FROM dbxref AS dbxref_1
 ON term_dbxref_1.dbxref_id = dbxref_1.<pk>
  dbxref_1.<pk> AS "dbx2"
  dbxref_1.xref_key AS "key2"
  dbxref_1.xref_dbname AS "keytype2"

example 2


 WHERE { ?t <term.name> "tumor necrosis factor receptor binding" .
         ?t <term_synonym.term_synonym> ?syn }


SELECT t.id, term_synonym
  FROM term t, term_synonym ts
 WHERE name ='tumor necrosis factor receptor binding'
   AND t.id = ts.term_id;
$Log: go.html,v $
Revision 1.4  2006/05/26 15:30:37  eric
make SQL reflect SPASQL

Revision 1.3  2006/05/26 14:41:42  eric
forgot to escape

Revision 1.2  2006/05/26 14:33:55  eric
chatting with bgilman

Revision 1.1  2006/05/26 14:17:15  eric

Eric Prud'hommeaux, W3C Team Contact for the RDF Data Access Working Group <eric@w3.org>
$Date: 2006/05/26 15:30:37 $