sparql-examples

A set of SPARQL examples that are used in different AMC resources

View the Project on GitHub AmsterdamUMC/sparql-examples

004

Berekent de gemiddelde waarden voor het netto gewicht per stuk en de milieueffecten per kilo, waaronder landgebruik, koolstofvoetafdruk en waterverbruik van handschoenen.

Use at


PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ns1: <http://example.org/>
PREFIX gido: <http://www.semanticweb.org/gido#>

SELECT
(AVG(?nettoGewichtPerStuk) AS ?avgnettoGewichtPerStuk)
    (AVG(?gebruikLandbouwGrond) AS ?avgGebruikLandbouwGrond)
    (AVG(?koolstofVoetafdruk) AS ?avgKoolstofVoetafdruk)
    (AVG(?WaterGebruik) AS ?avgWaterGebruik)
WHERE {
    ?s rdf:type gido:Glove ;
       ns1:Netto_gewicht_per_stuk__kg_ ?nettoGewichtPerStuk ;
       ns1:Gebruik_landbouwgrond__m2___kg_ ?gebruikLandbouwGrond ;
       ns1:Koolstofvoetafdruk__CO2_eq___kg_ ?koolstofVoetafdruk ;
       ns1:Water_gebruik__m3___kg_ ?WaterGebruik .
}
        
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?WaterGebruik"):::projected 
  v7("?avgGebruikLandbouwGrond")
  v8("?avgKoolstofVoetafdruk")
  v9("?avgWaterGebruik")
  v6("?avgnettoGewichtPerStuk")
  v3("?gebruikLandbouwGrond"):::projected 
  v4("?koolstofVoetafdruk"):::projected 
  v2("?nettoGewichtPerStuk"):::projected 
  v1("?s")
  c2([http://www.semanticweb.org/gido#Glove]):::iri 
  v1 --"a"-->  c2
  v1 --http://example.org/Netto_gewicht_per_stuk__kg_-->  v2
  v1 --http://example.org/Gebruik_landbouwgrond__m2___kg_-->  v3
  v1 --http://example.org/Koolstofvoetafdruk__CO2_eq___kg_-->  v4
  v1 --http://example.org/Water_gebruik__m3___kg_-->  v5
  bind4[/"average(?nettoGewichtPerStuk)"/]
  v2 --o bind4
  bind4 --as--o v6
  bind5[/"average(?gebruikLandbouwGrond)"/]
  v3 --o bind5
  bind5 --as--o v7
  bind6[/"average(?koolstofVoetafdruk)"/]
  v4 --o bind6
  bind6 --as--o v8
  bind7[/"average(?WaterGebruik)"/]
  v5 --o bind7
  bind7 --as--o v9