@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: 	<http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#> .
@prefix rdfs:	<http://www.w3.org/2000/01/rdf-schema#> .
@prefix mf:     <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix qt:     <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
@prefix dawgt:   <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> .

<>  rdf:type mf:Manifest ;
    rdfs:comment "SPARQL 1.1: aggregates (by Jeen Broekstra)" ;
    mf:entries
    (
    	:sparql11-count-01
    	:sparql11-count-02
    	:sparql11-count-03
    	:sparql11-count-04
    	:sparql11-order-01
    	:sparql11-order-02
    	:sparql11-order-03
    	:sparql11-max-01
    	:sparql11-min-01
    	:sparql11-sum-01
    	:sparql11-sum-02
    	:sparql11-sum-03
    	:sparql11-sum-04
    	:sparql11-having-01
    	:sparql11-avg-01
    	:sparql11-avg-02
    	:sparql11-aggregate-subquery-01
    	:sparql11-aggregate-subquery-02
    	:sparql11-aggregate-group-01
    	:sparql11-aggregate-group-02
# test case for issue SES-772. commented because not yet fixed
    	:sparql11-aggregate-expression-01
    ).


:sparql11-count-04  mf:name  "sparql11-count-04" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-count-04.rq> ; qt:data <data-07.ttl> ] ;
         mf:result <sparql11-count-04.srx> .
         
:sparql11-aggregate-group-01  mf:name  "sparql11-aggregate-group-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-aggregate-group-01.rq> ; qt:data <data-05.ttl> ] ;
         mf:result <sparql11-aggregate-group-01.srx> .

:sparql11-aggregate-group-02  mf:name  "sparql11-aggregate-group-02" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-aggregate-group-02.rq> ; qt:data <data-05.ttl> ] ;
         mf:result <sparql11-aggregate-group-02.srx> .   

:sparql11-aggregate-expression-01  mf:name  "sparql11-aggregate-expression-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-aggregate-expression-01.rq> ; qt:data <data-02.ttl> ] ;
         mf:result <sparql11-aggregate-expression-01.srx> .
               
:sparql11-count-01  mf:name  "sparql11-count-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-count-01.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-count-01.srx> .

:sparql11-count-02  mf:name  "sparql11-count-02" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-count-02.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-count-02.srx> .

:sparql11-count-03  mf:name  "sparql11-count-03" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-count-03.rq> ; qt:data <data-04.ttl> ] ;
         mf:result <sparql11-count-03.srx> .
                  
:sparql11-order-01  mf:name  "sparql11-order-01" ;
         rdf:type   mf:QueryEvaluationTest ;
	 mf:checkOrder "true"^^xsd:boolean ;
         mf:action [ qt:query <sparql11-order-01.rq> ; qt:data <data-03.ttl> ] ;
         mf:result <sparql11-order-01.srx> .

:sparql11-order-02  mf:name  "sparql11-order-02" ;
         rdf:type   mf:QueryEvaluationTest ;
	 mf:checkOrder "true"^^xsd:boolean ;
         mf:action [ qt:query <sparql11-order-02.rq> ; qt:data <data-03.ttl> ] ;
         mf:result <sparql11-order-02.srx> .
         
:sparql11-order-03  mf:name  "sparql11-order-03" ;
         rdf:type   mf:QueryEvaluationTest ;
	 mf:checkOrder "true"^^xsd:boolean ;
         mf:action [ qt:query <sparql11-order-03.rq> ; qt:data <data-03.ttl> ] ;
         mf:result <sparql11-order-03.srx> .
                  
:sparql11-max-01  mf:name  "sparql11-max-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-max-01.rq> ; qt:data <data-02.ttl> ] ;
         mf:result <sparql11-max-01.srx> .
         
:sparql11-min-01  mf:name  "sparql11-min-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-min-01.rq> ; qt:data <data-02.ttl> ] ;
         mf:result <sparql11-min-01.srx> .
         
:sparql11-sum-01  mf:name  "sparql11-sum-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-sum-01.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-sum-01.srx> .
             
:sparql11-sum-02  mf:name  "sparql11-sum-02" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-sum-02.rq> ; qt:data <data-04.ttl> ] ;
         mf:result <sparql11-sum-02.srx> .
         
:sparql11-sum-03  mf:name  "sparql11-sum-03" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-sum-03.rq> ; qt:data <data-06.ttl> ] ;
         mf:result <sparql11-sum-03.srx> .
              
:sparql11-sum-04  mf:name  "sparql11-sum-04" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-sum-04.rq> ; qt:data <data-08.ttl> ] ;
         mf:result <sparql11-sum-04.srx> .     
                  
:sparql11-having-01  mf:name  "sparql11-having-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-having-01.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-having-01.srx> .
         
:sparql11-avg-01  mf:name  "sparql11-avg-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-avg-01.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-avg-01.srx> .        
    
:sparql11-avg-02  mf:name  "sparql11-avg-02" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:action [ qt:query <sparql11-avg-02.rq> ; qt:data <data-08.ttl> ] ;
         mf:result <sparql11-avg-02.srx> .  
              
:sparql11-aggregate-subquery-01  mf:name  "sparql11-aggregate-subquery-01" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:checkOrder "true";
         mf:action [ qt:query <sparql11-aggregate-subquery-01.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-aggregate-subquery-01.srx> .              
         
:sparql11-aggregate-subquery-02  mf:name  "sparql11-aggregate-subquery-02" ;
         rdf:type   mf:QueryEvaluationTest ;
         mf:checkOrder "true";
         mf:action [ qt:query <sparql11-aggregate-subquery-02.rq> ; qt:data <data-01.ttl> ] ;
         mf:result <sparql11-aggregate-subquery-02.srx> .              
         
