query-8aa49d74212dc472f24b3f789358437e

rq turtle/ttl

Largest paintingsI am trying to list largest paintings:

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 p: <http://www.wikidata.org/prop/>
SELECT ?painting ?widthAmount ?heightAmount (?widthAmount * ?heightAmount AS ?area)
WHERE {
  ?painting wdt:P31 wd:Q3305213 .  # Instance of painting
  ?painting p:P2048 ?widthStatement .
  ?widthStatement ps:P2048 ?widthValue .
  ?widthStatement wikibase:rank wikibase:PreferredRank .
  ?widthValue wikibase:quantityAmount ?widthAmount .
  ?painting p:P2049 ?heightStatement .
  ?heightStatement ps:P2049 ?heightValue .
  ?heightStatement wikibase:rank wikibase:PreferredRank .
  ?heightValue wikibase:quantityAmount ?heightAmount .
}
ORDER BY DESC(?area)
LIMIT 10

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?area") v8("?heightAmount"):::projected v6("?heightStatement") v7("?heightValue") v2("?painting"):::projected v5("?widthAmount"):::projected v3("?widthStatement") v4("?widthValue") c2(["wd:Q3305213"]):::iri c6(["wikibase:PreferredRank"]):::iri v2 --"p:direct/P31"--> c2 v2 --"p:P2048"--> v3 v3 --"p:statement/P2048"--> v4 v3 --"wikibase:rank"--> c6 v4 --"wikibase:quantityAmount"--> v5 v2 --"p:P2049"--> v6 v6 --"p:statement/P2049"--> v7 v6 --"wikibase:rank"--> c6 v7 --"wikibase:quantityAmount"--> v8 bind0[/"?widthAmount * ?heightAmount"/] v5 --o bind0 v8 --o bind0 bind0 --as--o v9