---++++Dump all OrderLines including order date timestamps accurate to the second (as opposed to millisecond) and quantity expression.
PREFIX rdf:
PREFIX ndw:
PREFIX xsd:
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) > xsd:integer("15")) .
FILTER (xsd:dateTime (?o_date) > xsd:dateTime ("1996-01-01T10:00:00Z")) .
}
---++++Sample Data (Live Query Results)
* View Query Results [[http://demo.openlinksw.com/sparql?default-graph-uri=&should-sponge=&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&format=text%2Fhtml&debug=on][(via SPARQL Protocol URL)]]
* View Query Results [[http://demo.openlinksw.com/view/?format=application%2Frdf%2Bxml&maxrows=50&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&endpoint=/sparql&maxrows=50&default-graph-uri=][(via iSPARQL Results URL)]]
* View Query Editor [[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&endpoint=/sparql&maxrows=50&default-graph-uri=][(via iSPARQL Visual Query Editor URL)]]