query-31c68dcbd3c15d67d253445c3309cbda
added before 2016-10 SELECT ?object ?objectLabel (MAX(?area) AS ?area) WHERE { ?object p:P2046/psv:P2046 [ wikibase:quantityAmount ?baseArea; wikibase:quantityUnit [ p:P2370/psv:P2370 [ wikibase:quantityAmount ?unitArea; wikibase:quantityUnit wd:Q25343 ] ] ]. BIND(?baseArea * ?unitArea AS ?area). MINUS { ?object wdt:P31 wd:Q1371562. } SERVICE wikibase:label { bd:serviceParam wikibase:language "ru". } } GROUP BY ?object ?objectLabel ORDER BY DESC(?area) LIMIT 100
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#added before 2016-10
SELECT ?object ?objectLabel (MAX(?area) AS ?area)
WHERE
{
?object p:P2046/psv:P2046 [
wikibase:quantityAmount ?baseArea;
wikibase:quantityUnit [
p:P2370/psv:P2370 [
wikibase:quantityAmount ?unitArea;
wikibase:quantityUnit wd:Q25343
]
]
].
BIND(?baseArea * ?unitArea AS ?area).
MINUS { ?object wdt:P31 wd:Q1371562. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "ru". }
}
GROUP BY ?object ?objectLabel
ORDER BY DESC(?area)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?area"):::projected
v2("?baseArea")
v4("?object"):::projected
v3("?unitArea")
a5((" "))
a1((" "))
a3((" "))
a4((" "))
a2((" "))
c3(["wd:Q25343"]):::iri
c13(["ru"]):::literal
c9(["wd:Q1371562"]):::iri
c11(["bd:serviceParam"]):::iri
a1 --"wikibase:quantityAmount"--> v2
a2 --"wikibase:quantityAmount"--> v3
a2 --"wikibase:quantityUnit"--> c3
a3 --"p:P2370"--> a4
a4 --"p:statement/value/P2370"--> a2
a1 --"wikibase:quantityUnit"--> a3
v4 --"p:P2046"--> a5
a5 --"p:statement/value/P2046"--> a1
bind0[/"?baseArea * ?unitArea"/]
v2 --o bind0
v3 --o bind0
bind0 --as--o v5
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v4 --"p:direct/P31"--> c9
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind3[/"max(?area)"/]
v5 --o bind3
bind3 --as--o v5