# $Date: 2009-08-06 17:55:54 -0400 (Thu, 06 Aug 2009) $
# $Revision: 27002 $
# $Author: lkagal $

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix s: <http://dig.csail.mit.edu/2009/IARPA-PIR/sparql#> .
@prefix : <http://dig.csail.mit.edu/2009/IARPA-PIR/query1#> .

#An n3 serialization of the following SPARQL query
#PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#PREFIX foaf: <http://xmlns.com/foaf/0.1/>
#SELECT ?s ?id ?n WHERE {
#  ?s foaf:ssn ?n.
#  ?s foaf:age ?a.
#  ?s foaf:openid ?id.
#  FILTER (?n > s:AgeOfConsent)
#}
   
:Query-3 a s:Select;
    s:cardinality :ALL;
    s:POSList [
       s:variable :S;
       s:variable :ID;
       s:variable :N;
     ];
    s:WhereClause  :WHERE.

    :WHERE a s:DefaultGraphPattern;
         s:TriplePattern  { :S <http://xmlns.com/foaf/0.1/ssn> :N };
         s:TriplePattern  { :S <http://xmlns.com/foaf/0.1/age> :A };
         s:TriplePattern  { :S <http://xmlns.com/foaf/0.1/openid> :ID };
         s:Filter [
	         a s:ComparatorExpression;
             s:TriplePattern { :N s:BooleanGT s:AgeOfConsent }
         ].
        
#ends
