<docbook><section><title>NorthWindREFExample9</title><bridgehead class="http://www.w3.org/1999/xhtml:h4">Dump all OrderLines  including order date timestamps accurate to the second (as opposed to millisecond) and quantity expression.
</bridgehead>
<programlisting>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX ndw:&lt;http://demo.openlinksw.com/schemas/northwind#&gt;
PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
SELECT ?o_date ?p_name ?o_uprice ?quantity ?discount
WHERE
  { 
    ?ol rdf:type ndw:OrderLine .
    ?ol ndw:has_order_id ?oid .
    ?oid rdf:type ndw:Order .
    ?oid ndw:orderDate ?o_date .
    ?ol ndw:has_product_id ?pid .
    ?pid rdf:type ndw:Product .
    ?pid ndw:productName ?p_name . 
    ?ol ndw:unitPrice ?o_uprice.
    ?ol ndw:quantity ?quantity.
    ?ol ndw:discount ?discount.
    FILTER (xsd:integer(?quantity) &gt; xsd:integer(&quot;15&quot;)) .
    FILTER (xsd:dateTime (?o_date) &gt; xsd:dateTime  (&quot;1996-01-01T10:00:00Z&quot;)) .   
  }
</programlisting><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">Sample Data (Live Query Results)</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem>View Query Results <ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&amp;should-sponge=&amp;query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+ndw%3A%3Chttp%3A%2F%2Fdemo.openlinksw.com%2Fschemas%2Fnorthwind%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0ASELECT+%3Fo_date+%3Fp_name+%3Fo_uprice+%3Fquantity+%3Fdiscount%0D%0AWHERE%0D%0A++%7B+%0D%0A++++%3Fol+rdf%3Atype+ndw%3AOrderLine+.%0D%0A++++%3Fol+ndw%3Ahas_order_id+%3Foid+.%0D%0A++++%3Foid+rdf%3Atype+ndw%3AOrder+.%0D%0A++++%3Foid+ndw%3AorderDate+%3Fo_date+.%0D%0A++++%3Fol+ndw%3Ahas_product_id+%3Fpid+.%0D%0A++++%3Fpid+rdf%3Atype+ndw%3AProduct+.%0D%0A++++%3Fpid+ndw%3AproductName+%3Fp_name+.+%0D%0A++++%3Fol+ndw%3AunitPrice+%3Fo_uprice.%0D%0A++++%3Fol+ndw%3Aquantity+%3Fquantity.%0D%0A++++%3Fol+ndw%3Adiscount+%3Fdiscount.%0D%0A++++FILTER+%28xsd%3Ainteger%28%3Fquantity%29+%3E+xsd%3Ainteger%28%2215%22%29%29+.%0D%0A++++FILTER+%28xsd%3AdateTime+%28%3Fo_date%29+%3E+xsd%3AdateTime++%28%221996-01-01T10%3A00%3A00Z%22%29%29+.+++%0D%0A++%7D&amp;format=text%2Fhtml&amp;debug=on">(via SPARQL Protocol URL)</ulink> </listitem>
<listitem>View Query Results <ulink url="http://demo.openlinksw.com/view/?format=application%2Frdf%2Bxml&amp;maxrows=50&amp;query=%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20ndw%3A%3Chttp%3A%2F%2Fdemo.openlinksw.com%2Fschemas%2Fnorthwind%23%3E%0APREFIX%20xsd%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0ASELECT%20%3Fo_date%20%3Fp_name%20%3Fo_uprice%20%3Fquantity%20%3Fdiscount%0AWHERE%0A%20%20%7B%20%0A%20%20%20%20%3Fol%20rdf%3Atype%20ndw%3AOrderLine%20.%0A%20%20%20%20%3Fol%20ndw%3Ahas_order_id%20%3Foid%20.%0A%20%20%20%20%3Foid%20rdf%3Atype%20ndw%3AOrder%20.%0A%20%20%20%20%3Foid%20ndw%3AorderDate%20%3Fo_date%20.%0A%20%20%20%20%3Fol%20ndw%3Ahas_product_id%20%3Fpid%20.%0A%20%20%20%20%3Fpid%20rdf%3Atype%20ndw%3AProduct%20.%0A%20%20%20%20%3Fpid%20ndw%3AproductName%20%3Fp_name%20.%20%0A%20%20%20%20%3Fol%20ndw%3AunitPrice%20%3Fo_uprice.%0A%20%20%20%20%3Fol%20ndw%3Aquantity%20%3Fquantity.%0A%20%20%20%20%3Fol%20ndw%3Adiscount%20%3Fdiscount.%0A%20%20%20%20FILTER%20(xsd%3Ainteger(%3Fquantity)%20%3E%20xsd%3Ainteger(%2215%22))%20.%0A%20%20%20%20FILTER%20(xsd%3AdateTime%20(%3Fo_date)%20%3E%20xsd%3AdateTime%20%20(%221996-01-01T10%3A00%3A00Z%22))%20.%20%20%20%0A%20%20%7D&amp;endpoint=/sparql&amp;maxrows=50&amp;default-graph-uri=">(via iSPARQL Results URL)</ulink> </listitem>
<listitem>View Query Editor <ulink url="http://demo.openlinksw.com/isparql/?query=PREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20ndw%3A%3Chttp%3A%2F%2Fdemo.openlinksw.com%2Fschemas%2Fnorthwind%23%3E%0APREFIX%20xsd%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0ASELECT%20%3Fo_date%20%3Fp_name%20%3Fo_uprice%20%3Fquantity%20%3Fdiscount%0AWHERE%0A%20%20%7B%20%0A%20%20%20%20%3Fol%20rdf%3Atype%20ndw%3AOrderLine%20.%0A%20%20%20%20%3Fol%20ndw%3Ahas_order_id%20%3Foid%20.%0A%20%20%20%20%3Foid%20rdf%3Atype%20ndw%3AOrder%20.%0A%20%20%20%20%3Foid%20ndw%3AorderDate%20%3Fo_date%20.%0A%20%20%20%20%3Fol%20ndw%3Ahas_product_id%20%3Fpid%20.%0A%20%20%20%20%3Fpid%20rdf%3Atype%20ndw%3AProduct%20.%0A%20%20%20%20%3Fpid%20ndw%3AproductName%20%3Fp_name%20.%20%0A%20%20%20%20%3Fol%20ndw%3AunitPrice%20%3Fo_uprice.%0A%20%20%20%20%3Fol%20ndw%3Aquantity%20%3Fquantity.%0A%20%20%20%20%3Fol%20ndw%3Adiscount%20%3Fdiscount.%0A%20%20%20%20FILTER%20(xsd%3Ainteger(%3Fquantity)%20%3E%20xsd%3Ainteger(%2215%22))%20.%0A%20%20%20%20FILTER%20(xsd%3AdateTime%20(%3Fo_date)%20%3E%20xsd%3AdateTime%20%20(%221996-01-01T10%3A00%3A00Z%22))%20.%20%20%20%0A%20%20%7D&amp;endpoint=/sparql&amp;maxrows=50&amp;default-graph-uri=">(via iSPARQL Visual Query Editor URL)</ulink> </listitem>
</itemizedlist></section></docbook>