query-8535f521f5a11f7a508f37532e1ec0a1
Profiling types of items. (Q212805)digital library We wrote a query to return a list of properties used on instances of
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?pred (SAMPLE(?propName) as ?propExample) (COUNT(1) as ?numberTotalOccurs) WHERE {
?item wdt:P31 wd:Q212805.
?item ?pred ?obj.
?prop wikibase:directClaim ?pred.
?prop rdfs:label ?propName
FILTER ( lang(?propName) = "en" )
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?pred
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item")
v7("?numberTotalOccurs")
v4("?obj")
v3("?pred"):::projected
v5("?prop")
v6("?propExample")
v1("?propName"):::projected
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q212805"]):::iri
f0[["?propName = 'en'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 -->v3--> v4
v5 --"wikibase:directClaim"--> v3
v5 --"rdfs:label"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind3[/"sample(?propName)"/]
v1 --o bind3
bind3 --as--o v6
bind4[/"count('1^^xsd:integer')"/]
bind4 --as--o v7