<?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
  ?c_count,
  count(1) as ?custdist
from <http://demo.openlinksw.com/tpch>
where {
    { select
        ?cust+>tpch:custkey,
        count (?ord) as ?c_count
      where
        {
          ?cust a tpch:customer .
          optional { ?cust tpch:customer_of ?ord
              filter (!(?ord+>tpch:comment like "%special%requests%")) }
        }
    }
  }
order by
  desc (count(1))
  desc (?c_count)
]]></query><graph>http://demo.openlinksw.com/tpch</graph></ISparqlDynamicPage><should_sponge>soft</should_sponge><service>/sparql</service></iSPARQL>