query-1db30efa73b149438ab6861d6360d281

rq turtle/ttl

Map of third party funded projects on rdm including budget

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"hide":"?geoLocs", "layer":"?FoerderprogrammLabel"}
SELECT ?Projekt ?ProjektLabel ?InstitutionLabel ?Foerderprogramm ?FoerderprogrammLabel (MIN(?geoLoc) AS ?geoLocs) ?FunderLabel ?Cost_with_currency 
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?Projekt wdt:P31 wd:Q170584 ;
           wdt:P101 wd:Q30089794 ;
           wdt:P361 ?Foerderprogramm ;
           wdt:P859 ?Funder ;
           p:P1416 [ps:P1416 ?Institution ;
                    pq:P2769 ?Budget_EURO ;
                    ] ;
           p:P1416 [pqv:P2769 ?valuenode] .
  ?valuenode     wikibase:quantityUnit       ?Currency .
  ?Currency wdt:P498 ?CurrencyLabel .
  BIND(CONCAT(str(?Budget_EURO), " ", str(?CurrencyLabel)) as ?Cost_with_currency)
  OPTIONAL { ?Institution wdt:P625 ?geoLoc .}
  OPTIONAL { ?Institution(wdt:P159/wdt:P625) ?geoHead. }
  BIND(COALESCE(?geoLoc, ?geoHead) AS ?geoLoc)
}
GROUP BY  ?Cost_with_currency ?FunderLabel ?Foerderprogramm ?FoerderprogrammLabel ?InstitutionLabel ?Projekt  ?ProjektLabel

Query found at