Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's now a few years later and the <a href="http://www.w3.org/TR/sparql11-query/" rel="nofollow noreferrer">SPARQL 1.1 Query Language</a> has been published. It includes many more built-in functions than the original SPARQL query language. In addition to lots of functions on strings, RDF terms, &amp;c., there are a number of numeric functions (the section numbers indicate the section in the linked standard):</p> <blockquote> <ul> <li>17.4.4 <a href="http://www.w3.org/TR/sparql11-query/#func-numerics" rel="nofollow noreferrer">Functions on Numerics</a> <ul> <li>17.4.4.1 <a href="http://www.w3.org/TR/sparql11-query/#func-abs" rel="nofollow noreferrer">abs</a></li> <li>17.4.4.2 <a href="http://www.w3.org/TR/sparql11-query/#func-round" rel="nofollow noreferrer">round</a></li> <li>17.4.4.3 <a href="http://www.w3.org/TR/sparql11-query/#func-ceil" rel="nofollow noreferrer">ceil</a></li> <li>17.4.4.4 <a href="http://www.w3.org/TR/sparql11-query/#func-floor" rel="nofollow noreferrer">floor</a></li> <li>17.4.4.5 <a href="http://www.w3.org/TR/sparql11-query/#idp2130040" rel="nofollow noreferrer">RAND</a></li> </ul></li> </ul> </blockquote> <p>There's still no <code>square</code> function here, and the quickest way to implement that will be using <code>*</code>, so <a href="https://stackoverflow.com/a/1404420/1281433">laalto's answer</a> still stands. The operators that SPARQL supports are described in <a href="http://www.w3.org/TR/sparql11-query/#OperatorMapping" rel="nofollow noreferrer">17.3 Operator Mapping</a>, and for XPath arithmetic is still just the set of <code>+</code>, <code>-</code>, <code>*</code>, and <code>/</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload