query-83415893cf4dc62842e87a80c086c731
German Vereine (Nonprofit Organisations) by Revenue SELECT ?OrgaLabel ?Revenue (YEAR(?Renevue_time) AS ?year) ?ValutaLabel ?rank WHERE { ?Orga wdt:P1454 wd:Q9299236 . # Select German Nonprofit Organisations ?Orga p:P2139 ?Revenue_statement . ?Revenue_statement psv:P2139 ?Renevue_value . ?Renevue_value wikibase:quantityAmount ?Revenue . ?Renevue_value wikibase:quantityUnit ?Valuta . ?Revenue_statement pq:P585 ?Renevue_time . ?Revenue_statement wikibase:rank ?rank . FILTER NOT EXISTS { ?Orga p:P2139/pq:P585 ?Renevue_time2 . FILTER(?Renevue_time2 > ?Renevue_time) } SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en".} }
ORDER BY DESC(?Revenue) LIMIT 500
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#German Vereine (Nonprofit Organisations) by Revenue
SELECT ?OrgaLabel ?Revenue (YEAR(?Renevue_time) AS ?year) ?ValutaLabel ?rank
WHERE
{
?Orga wdt:P1454 wd:Q9299236 . # Select German Nonprofit Organisations
?Orga p:P2139 ?Revenue_statement .
?Revenue_statement psv:P2139 ?Renevue_value .
?Renevue_value wikibase:quantityAmount ?Revenue .
?Renevue_value wikibase:quantityUnit ?Valuta .
?Revenue_statement pq:P585 ?Renevue_time .
?Revenue_statement wikibase:rank ?rank .
FILTER NOT EXISTS
{
?Orga p:P2139/pq:P585 ?Renevue_time2 .
FILTER(?Renevue_time2 > ?Renevue_time)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en".}
}
ORDER BY DESC(?Revenue)
LIMIT 500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?Orga")
v3("?Renevue_time"):::projected
v2("?Renevue_time2")
v6("?Renevue_value")
v1("?Revenue"):::projected
v5("?Revenue_statement")
v7("?Valuta")
v8("?rank"):::projected
v9("?year")
a1((" "))
c10(["bd:serviceParam"]):::iri
c4(["wd:Q9299236"]):::iri
c12(["de,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?Renevue_time2 > ?Renevue_time"]]
e0f0 --> e0v1
e0f0 --> e0v2
e0v3 --"p:P2139"--> e0a1
e0a1 --"p:qualifier/P585"--> e0v1
e0v3("?Orga"):::projected
e0v2("?Renevue_time"):::projected
e0v1("?Renevue_time2"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> v3
f0 --> v4
f0 --> c1
f0 --> a1
f0 --> c2
f1[["?Renevue_time2 > ?Renevue_time"]]
f1 --> v2
f1 --> v3
v4 --"p:P2139"--> a1
a1 --"p:qualifier/P585"--> v2
v4 --"p:direct/P1454"--> c4
v4 --"p:P2139"--> v5
v5 --"p:statement/value/P2139"--> v6
v6 --"wikibase:quantityAmount"--> v1
v6 --"wikibase:quantityUnit"--> v7
v5 --"p:qualifier/P585"--> v3
v5 --"wikibase:rank"--> v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind2[/"year-from-dateTime(?Renevue_time)"/]
v3 --o bind2
bind2 --as--o v9