query-629e094e38cb35c1f3e425fe1504b8bc
title: Organizations GHG emissions using scopes (as defined by the GHG protocol) SELECT ?item ?itemLabel ?scopeLabel ?emission_amount ?unitLabel ?typeLabel WHERE { ?scope wdt:P279* wd:Q120897419 . # Finds all scope items ?item p:P5991 ?p . # Finds all items with carbon footprint statements ?p pq:P3831 ?scope ; # ..but only use those qualified with one of the scopes ps:P5991 ?emission_amount ; # Get the emission amount psv:P5991 / wikibase:quantityUnit ?unit . # Get the emission unit OPTIONAL {?p pq:P518 ?type} # Get the type of scope (for Scope 3 emissions) SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". } } ORDER BY ?itemLabel ?scopeLabel
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Organizations GHG emissions using scopes (as defined by the GHG protocol)
SELECT ?item ?itemLabel ?scopeLabel ?emission_amount ?unitLabel ?typeLabel WHERE {
?scope wdt:P279* wd:Q120897419 . # Finds all scope items
?item p:P5991 ?p . # Finds all items with carbon footprint statements
?p pq:P3831 ?scope ; # ..but only use those qualified with one of the scopes
ps:P5991 ?emission_amount ; # Get the emission amount
psv:P5991 / wikibase:quantityUnit ?unit . # Get the emission unit
OPTIONAL {?p pq:P518 ?type} # Get the type of scope (for Scope 3 emissions)
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
} ORDER BY ?itemLabel ?scopeLabel
Query found at
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Climate_Change/Models
- https://www.wikidata.org/wiki/Wikidata_talk:WikiProject_Climate_Change
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?emission_amount"):::projected
v4("?item"):::projected
v1("?itemLabel"):::projected
v5("?p")
v3("?scope")
v2("?scopeLabel"):::projected
v8("?type")
v7("?unit")
a1((" "))
c10(["bd:serviceParam"]):::iri
c2(["wd:Q120897419"]):::iri
c12(["sv,en"]):::literal
v3 --"p:direct/P279"--> c2
v4 --"p:P5991"--> v5
v5 --"p:qualifier/P3831"--> v3
v5 --"p:statement/P5991"--> v6
v5 --"p:statement/value/P5991"--> a1
a1 --"wikibase:quantityUnit"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P518".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end