<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/isparql/xslt/dynamic-page.xsl"?><iSPARQL xmlns="urn:schemas-openlink-com:isparql"><ISparqlDynamicPage><proxy>true</proxy><query><![CDATA[#service:/sparql
#should-sponge:soft

define sql:signal-void-variables 1
prefix tpch: <http://www.openlinksw.com/schemas/tpch#>
prefix oplsioc: <http://www.openlinksw.com/schemas/oplsioc#>
prefix sioc: <http://rdfs.org/sioc/ns#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
select
  ?l+>tpch:returnflag,
  ?l+>tpch:linestatus,
  sum(?l+>tpch:linequantity) as ?sum_qty,
  sum(?l+>tpch:lineextendedprice) as ?sum_base_price,
  sum(?l+>tpch:lineextendedprice*(1 - ?l+>tpch:linediscount)) as ?sum_disc_price,
  sum(?l+>tpch:lineextendedprice*(1 - ?l+>tpch:linediscount)*(?l+>tpch:linetax)) as ?sum_charge,
  avg(?l+>tpch:linequantity) as ?avg_qty,
  avg(?l+>tpch:lineextendedprice) as ?avg_price,
  avg(?l+>tpch:linediscount) as ?avg_disc,
  count(1) as ?count_order
from <http://demo.openlinksw.com/tpch>
where {
    ?l a tpch:lineitem .
    filter (?l+>tpch:shipdate <= bif:dateadd ("day", 90, '1998-12-01'^^xsd:date)) }
order by ?l+>tpch:returnflag ?l+>tpch:linestatus
]]></query><graph>http://demo.openlinksw.com/tpch</graph></ISparqlDynamicPage><should_sponge>soft</should_sponge><service>/sparql</service></iSPARQL>