Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtTipsAndTricksSPARQL11Assign
- VirtTipsAndTricksSPARQL11Assign
|
seeAlso
| |
maker
| |
Title
| - VirtTipsAndTricksSPARQL11Assign
- VirtTipsAndTricksSPARQL11Assign
|
isDescribedUsing
| |
has creator
| |
content
| - %META:TOPICPARENT{name="VirtTipsAndTricksSPARQL11FeaturesExamplesCollection"}%
---+ Using SPARQL 1.1 Assignments
---++What?
Using SPARQL 1.1 assignments.
---++Why?
Allows the creation of new values in a query.
---++How?
Here is example showcasing Virtuoso's support for this functionality:
1 Assume the following Raw Data Representation in Turtle:
<verbatim>
<#lemonade> <#price> 4 .
<#wine> <#price> 6 .
<#water> <#price> 1 .
<#beer> <#price> 3 .
<#liqueur> <#price> 5 .
</verbatim>
1 Load the sample data using SPARQL 1.1. INSERT Syntax:
<verbatim>
INSERT
{
GRAPH <urn:sparql:tests:assign>
{
<#lemonade> <#price> 4 .
<#wine> <#price> 6 .
<#water> <#price> 1 .
<#beer> <#price> 3 .
<#liqueur> <#price> 5 .
}
}
</verbatim>
1 Let's assign new price:
<verbatim>
SELECT ?item (?price*2.3 as ?NewPrice)
FROM <urn:sparql:tests:assign>
WHERE
{
?item <#price> ?price
}
</verbatim>
* [[http://bit.ly/VpdZ0Q][View the SPARQL Query Definition via SPARQL Protocol URL]]
* [[http://bit.ly/Z8r4vg][View the SPARQL Query Results via SPARQL Protocol URL]]
---++Related
* [[VirtTipsAndTricksSPARQL11FeaturesExamplesCollection][SPARQL 1.1 Features Examples Collection]]
* [[http://www.w3.org/TR/2010/WD-sparql11-property-paths-20100126/][SPARQL 1.1. Property Paths]]
* [[http://www.w3.org/TR/sparql11-query/#inline-data][SPARQL inline data via use of VALUES clause]]
* [[http://virtuoso.openlinksw.com/tutorials/sparql/SPARQL_Tutorials_Part_9/SPARQL_Tutorials_Part_9.html][Virtuoso SPARQL 1.1 Syntax Tutorial]]
* [[http://www.w3.org/TR/2010/WD-sparql11-query-20100126/#subqueries][SPARQL 1.1 Sub-queries]]
* [[http://www.w3.org/TR/sparql11-query/][SPARQL 1.1 Specification]]
* [[http://www.w3.org/TR/rdf-sparql-protocol/][SPARQL Protocol (HTTP based Query Service)]]
* [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
- %META:TOPICPARENT{name="VirtTipsAndTricksSPARQL11FeaturesExamplesCollection"}%
---+ Using SPARQL 1.1 Assignments
---++What?
Using SPARQL 1.1 assignments.
---++Why?
Allows the creation of new values in a query.
---++How?
Here is example showcasing Virtuoso's support for this functionality:
1 Assume the following Raw Data Representation in Turtle:
<verbatim>
<#lemonade> <#price> 4 .
<#wine> <#price> 6 .
<#water> <#price> 1 .
<#beer> <#price> 3 .
<#liqueur> <#price> 5 .
</verbatim>
1 Load the sample data using SPARQL 1.1. INSERT Syntax:
<verbatim>
INSERT
{
GRAPH <urn:sparql:tests:assign>
{
<#lemonade> <#price> 4 .
<#wine> <#price> 6 .
<#water> <#price> 1 .
<#beer> <#price> 3 .
<#liqueur> <#price> 5 .
}
}
</verbatim>
1 Let's assign new price:
<verbatim>
SELECT ?item (?price*2.3 as ?NewPrice)
FROM <urn:sparql:tests:assign>
WHERE
{
?item <#price> ?price
}
</verbatim>
* [[http://bit.ly/VpdZ0Q][View the SPARQL Query Definition via SPARQL Protocol URL]]
* [[http://bit.ly/Z8r4vg][View the SPARQL Query Results via SPARQL Protocol URL]]
---++Related
* [[VirtTipsAndTricksSPARQL11FeaturesExamplesCollection][SPARQL 1.1 Features Examples Collection]]
* [[http://www.w3.org/TR/2010/WD-sparql11-property-paths-20100126/][SPARQL 1.1. Property Paths]]
* [[http://www.w3.org/TR/sparql11-query/#inline-data][SPARQL inline data via use of VALUES clause]]
* [[http://virtuoso.openlinksw.com/tutorials/sparql/SPARQL_Tutorials_Part_9/SPARQL_Tutorials_Part_9.html][Virtuoso SPARQL 1.1 Syntax Tutorial]]
* [[http://www.w3.org/TR/2010/WD-sparql11-query-20100126/#subqueries][SPARQL 1.1 Sub-queries]]
* [[http://www.w3.org/TR/sparql11-query/][SPARQL 1.1 Specification]]
* [[http://www.w3.org/TR/rdf-sparql-protocol/][SPARQL Protocol (HTTP based Query Service)]]
* [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
|
id
| - d963b82e175575e7787d77776053af4b
- d963b82e175575e7787d77776053af4b
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtTipsAndTricksSPARQL11Assign
- VirtTipsAndTricksSPARQL11Assign
|
links to
| |
atom:source
| |
atom:author
| |
atom:published
| - 2017-06-13T05:41:15Z
- 2017-06-13T05:41:15Z
|
atom:updated
| - 2017-06-13T05:41:15Z
- 2017-06-13T05:41:15Z
|
topic
| |
is made
of | |
is container of
of | |
is link
of | |
is http://rdfs.org/si...vices#services_of
of | |
is links to
of | |
is creator of
of | |
is atom:entry
of | |
is atom:contains
of | |