-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathq9-sankey.sparql
17 lines (14 loc) · 915 Bytes
/
q9-sankey.sparql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#First twenty value highest exports between value added origin countries to final demand EU countries
SELECT (STRAFTER(str(?fado_country), "#") AS ?source) (STRAFTER(str(?fd_country), "#") AS ?target) (SUM(?eivalue) AS ?sum)
FROM <none>
WHERE {
?s rdf:type <https://schema.coypu.org/ontology/fdva-bsci/fdva#ValueAddedOriginOfFinalDemand> .
?s <https://schema.coypu.org/ontology/fdva-bsci/fdva#hasFinalDemand> ?fd .
?fd <https://schema.coypu.org/global#hasCountryLocation> ?fd_country .
?s <https://schema.coypu.org/ontology/fdva-bsci/fdva#hasValueAddedOrigin> ?fado .
?fado <https://schema.coypu.org/global#hasCountryLocation> ?fado_country .
?s <https://schema.coypu.org/global#hasValue> ?value .
?s <https://schema.coypu.org/ontology/fdva-bsci/fdva#hasYear> ?year .
BIND(xsd:string(?value) as ?val ) .
BIND(xsd:integer(?val) as ?eivalue) .
} GROUP BY ?fd_country ?fado_country ORDER BY DESC(?sum) LIMIT 20