query-2d2a88b1a2ac2504b015100a0f12169b
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?property ?paintings ?pvalues (COUNT(?item) AS ?items) (COUNT(?value) AS ?values)
WHERE {
{
SELECT DISTINCT ?pproperty (COUNT(DISTINCT ?painting) AS ?paintings) (COUNT(DISTINCT ?pvalue) AS ?pvalues) WHERE {
?painting wdt:P31 wd:Q3305213.
?painting ?pproperty ?pvalue.
?pproperty rdf:type owl:DatatypeProperty.
}
GROUP BY ?pproperty
}
?item wdt:P31/wdt:P279* wd:Q6256.
#?item ?property ?value.
#?property rdf:type owl:DatatypeProperty.
#OPTIONAL {?painting ?property ?pvalue.}
}
GROUP BY ?property ?paintings ?pvalues
ORDER BY DESC(?items)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?item"):::projected
v9("?items")
v2("?painting")
v5("?paintings"):::projected
v3("?pproperty")
v4("?pvalue")
v6("?pvalues"):::projected
v8("?value"):::projected
v9("?values")
a1((" "))
c2(["wd:Q3305213"]):::iri
c4(["owl:DatatypeProperty"]):::iri
c6(["wd:Q6256"]):::iri
v2 --"wdt:P31"--> c2
v2 -->v3--> v4
v3 --"a"--> c4
bind2[/"count(?painting)"/]
v2 --o bind2
bind2 --as--o v5
bind3[/"count(?pvalue)"/]
v4 --o bind3
bind3 --as--o v6
v7 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
bind6[/"count(?item)"/]
v7 --o bind6
bind6 --as--o v9
bind7[/"count(?value)"/]
v8 --o bind7
bind7 --as--o v9