<?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
  (sum(?li+>tpch:lineextendedprice * (1 - ?li+>tpch:linediscount))) as ?revenue
from <http://demo.openlinksw.com/tpch>
where
  {
    ?li a tpch:lineitem ; tpch:has_part ?part ; tpch:shipinstruct "DELIVER IN PERSON" .
    filter (?li+>tpch:shipmode in ("AIR", "AIR REG") &&
      ( ( (?part+>tpch:brand = "Brand#12") &&
          (?part+>tpch:container in ("SM CASE", "SM BOX", "SM PACK", "SM PKG")) &&
          (?li+>tpch:linequantity >= 1) && (?li+>tpch:linequantity <= 1 + 10) &&
          (?part+>tpch:size >= 1) && (?part+>tpch:size <= 5) ) ||
        ( (?part+>tpch:brand = "Brand#23") &&
          (?part+>tpch:container in ("MED BAG", "MED BOX", "MED PKG", "MED PACK")) &&
          (?li+>tpch:linequantity >= 10) && (?li+>tpch:linequantity <= 10 + 10) &&
          (?part+>tpch:size >= 1) && (?part+>tpch:size <= 10) ) ||
        ( (?part+>tpch:brand = "Brand#34") &&
          (?part+>tpch:container in ("LG CASE", "LG BOX", "LG PACK", "LG PKG")) &&
          (?li+>tpch:linequantity >= 20) && (?li+>tpch:linequantity <= 20 + 10) &&
          (?part+>tpch:size >= 1) && (?part+>tpch:size <= 15) ) ) )
  }
]]></query><graph>http://demo.openlinksw.com/tpch</graph></ISparqlDynamicPage><should_sponge>soft</should_sponge><service>/sparql</service></iSPARQL>