<?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
  ?li+>tpch:shipmode,
  sum (
    bif:__or (
      bif:equ (?ord+>tpch:orderpriority, "1-URGENT"),
      bif:equ (?ord+>tpch:orderpriority, "2-HIGH") ) ) as ?high_line_count,
  sum (1 -
    bif:__or (
      bif:equ (?ord+>tpch:orderpriority, "1-URGENT"),
      bif:equ (?ord+>tpch:orderpriority, "2-HIGH") ) ) as ?low_line_count
from <http://demo.openlinksw.com/tpch>
where
  { ?li tpch:has_order ?ord .
    filter (?li+>tpch:shipmode in ("MAIL", "SHIP") &&
      (?li+>tpch:commitdate < ?li+>tpch:receiptdate) &&
      (?li+>tpch:shipdate < ?li+>tpch:commitdate) &&
      (?li+>tpch:receiptdate >= "1994-01-01"^^xsd:date) &&
      (?li+>tpch:receiptdate < bif:dateadd ("year", 1, "1994-01-01"^^xsd:date)) )
  }
order by
  ?li+>tpch:shipmode
]]></query><graph>http://demo.openlinksw.com/tpch</graph></ISparqlDynamicPage><should_sponge>soft</should_sponge><service>/sparql</service></iSPARQL>