query-92db45f78686da096b82ae4cbf8bd6cd
List of predicates, which are not IDs, and frequency of use. SELECT DISTINCT ?p ?ppLabel ?count WITH { SELECT ?p (COUNT(?p) AS ?count) WHERE { [] ?p [] . } GROUP BY ?p } AS %i WHERE { INCLUDE %i MINUS { ?pp ?ptype ?p. ?pp wikibase:propertyType wikibase:ExternalId. } OPTIONAL { ?pp wikibase:claim|wikibase:directClaim|wikibase:directClaimNormalized| wikibase:qualifier|wikibase:qualifierValue|wikibase:qualifierValueNormalized| wikibase:statementProperty|wikibase:statementValue|wikibase:statementValueNormalized| wikibase:reference|wikibase:referenceValue|wikibase:referenceValueNormalized ?p . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } } ORDER BY DESC(?count)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#List of predicates, which are not IDs, and frequency of use.
SELECT DISTINCT ?p ?ppLabel ?count
WHERE {
{
SELECT ?p (COUNT(?p) AS ?count)
WHERE { [] ?p [] . }
GROUP BY ?p
} MINUS { ?pp ?ptype ?p. ?pp wikibase:propertyType wikibase:ExternalId. }
OPTIONAL {
?pp wikibase:claim|wikibase:directClaim|wikibase:directClaimNormalized|
wikibase:qualifier|wikibase:qualifierValue|wikibase:qualifierValueNormalized|
wikibase:statementProperty|wikibase:statementValue|wikibase:statementValueNormalized|
wikibase:reference|wikibase:referenceValue|wikibase:referenceValueNormalized ?p .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?count"):::projected
v2("?p"):::projected
v3("?pp")
v4("?ptype")
a1((" "))
a2((" "))
c2(["wikibase:ExternalId"]):::iri
c16(["bd:serviceParam"]):::iri
c18(["#91;AUTO_LANGUAGE#93;,en"]):::literal
a1 -->v2--> a2
bind1[/"count(?p)"/]
v2 --o bind1
bind1 --as--o v3
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 -->v4--> v2
v3 --"wikibase:propertyType"--> c2
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
subgraph union5[" Union "]
subgraph union5l[" "]
style union5l fill:#abf,stroke-dasharray: 3 3;
subgraph union6[" Union "]
subgraph union6l[" "]
style union6l fill:#abf,stroke-dasharray: 3 3;
subgraph union7[" Union "]
subgraph union7l[" "]
style union7l fill:#abf,stroke-dasharray: 3 3;
subgraph union8[" Union "]
subgraph union8l[" "]
style union8l fill:#abf,stroke-dasharray: 3 3;
subgraph union9[" Union "]
subgraph union9l[" "]
style union9l fill:#abf,stroke-dasharray: 3 3;
subgraph union10[" Union "]
subgraph union10l[" "]
style union10l fill:#abf,stroke-dasharray: 3 3;
v3 -."wikibase:referenceValueNormalized".-> v2
end
subgraph union10r[" "]
style union10r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:referenceValue"--> v2
end
union10r <== or ==> union10l
end
end
subgraph union9r[" "]
style union9r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:reference"--> v2
end
union9r <== or ==> union9l
end
end
subgraph union8r[" "]
style union8r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:statementValueNormalized"--> v2
end
union8r <== or ==> union8l
end
end
subgraph union7r[" "]
style union7r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:statementValue"--> v2
end
union7r <== or ==> union7l
end
end
subgraph union6r[" "]
style union6r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:statementProperty"--> v2
end
union6r <== or ==> union6l
end
end
subgraph union5r[" "]
style union5r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:qualifierValueNormalized"--> v2
end
union5r <== or ==> union5l
end
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:qualifierValue"--> v2
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:qualifier"--> v2
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:directClaimNormalized"--> v2
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:directClaim"--> v2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:claim"--> v2
end
union0r <== or ==> union0l
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end