query-0d9a86d6f854c399763f08ef5a991194
rq turtle/ttl
title:Property completeness of manuscripts with a given manuscript ID
SELECT ?id ?idLabel (COUNT(?item) AS ?total) (COUNT(?coll) AS ?collection) (COUNT(?inv_no) AS ?inventory) (COUNT(?lang) AS ?language) (COUNT(?exemp) AS ?exemplar)
(COUNT(?incep) AS ?inception) (COUNT(?creat) AS ?creation) (COUNT(?h) AS ?height) (COUNT(?w) AS ?width) (COUNT(?scrip) AS ?script) WHERE {
VALUES ?p {p:P1577 p:P1948 p:P3702 p:P3768 p:P4752 p:P6108 p:P7989 p:P8532 p:P9015 p:P10236 p:P10481 p:P12042 p:P12109 p:P12116}
?item wdt:P31/wdt:P279* wd:Q87167.
?id wikibase:propertyType wikibase:ExternalId; wikibase:claim ?p; wikibase:statementProperty ?ps.
?item ?p [ ?ps ?value ] .
OPTIONAL {?item wdt:P195 ?coll}
OPTIONAL {?item wdt:P217 ?inv_no}
OPTIONAL {?item wdt:P407 ?lang}
OPTIONAL {?item wdt:P1574 ?exemp}
OPTIONAL {?item wdt:P571 ?incep}
OPTIONAL {?item wdt:P1071 ?creat}
OPTIONAL {?item wdt:P2048 ?h}
OPTIONAL {?item wdt:P2049 ?w}
OPTIONAL {?item wdt:P9302 ?scrip}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?id ?idLabel
ORDER BY ?idLabel
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Property completeness of manuscripts with a given manuscript ID
SELECT ?id ?idLabel (COUNT(?item) AS ?total) (COUNT(?coll) AS ?collection) (COUNT(?inv_no) AS ?inventory) (COUNT(?lang) AS ?language) (COUNT(?exemp) AS ?exemplar)
(COUNT(?incep) AS ?inception) (COUNT(?creat) AS ?creation) (COUNT(?h) AS ?height) (COUNT(?w) AS ?width) (COUNT(?scrip) AS ?script) WHERE {
VALUES ?p {p:P1577 p:P1948 p:P3702 p:P3768 p:P4752 p:P6108 p:P7989 p:P8532 p:P9015 p:P10236 p:P10481 p:P12042 p:P12109 p:P12116}
?item wdt:P31/wdt:P279* wd:Q87167.
?id wikibase:propertyType wikibase:ExternalId; wikibase:claim ?p; wikibase:statementProperty ?ps.
?item ?p [ ?ps ?value ] .
OPTIONAL {?item wdt:P195 ?coll}
OPTIONAL {?item wdt:P217 ?inv_no}
OPTIONAL {?item wdt:P407 ?lang}
OPTIONAL {?item wdt:P1574 ?exemp}
OPTIONAL {?item wdt:P571 ?incep}
OPTIONAL {?item wdt:P1071 ?creat}
OPTIONAL {?item wdt:P2048 ?h}
OPTIONAL {?item wdt:P2049 ?w}
OPTIONAL {?item wdt:P9302 ?scrip}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?id ?idLabel
ORDER BY ?idLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?coll"):::projected
v17("?collection")
v12("?creat"):::projected
v22("?creation")
v10("?exemp"):::projected
v20("?exemplar")
v13("?h"):::projected
v23("?height")
v4("?id"):::projected
v1("?idLabel"):::projected
v11("?incep"):::projected
v21("?inception")
v8("?inv_no"):::projected
v18("?inventory")
v3("?item"):::projected
v9("?lang"):::projected
v19("?language")
v2("?p")
v5("?ps")
v15("?scrip"):::projected
v25("?script")
v16("?total")
v6("?value")
v14("?w"):::projected
v24("?width")
a1((" "))
a2((" "))
c5(["wikibase:ExternalId"]):::iri
c3(["wd:Q87167"]):::iri
c18(["bd:serviceParam"]):::iri
c20(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?p/]
bind0-->v2
bind00(["p:P1577"])
bind00 --> bind0
bind01(["p:P1948"])
bind01 --> bind0
bind02(["p:P3702"])
bind02 --> bind0
bind03(["p:P3768"])
bind03 --> bind0
bind04(["p:P4752"])
bind04 --> bind0
bind05(["p:P6108"])
bind05 --> bind0
bind06(["p:P7989"])
bind06 --> bind0
bind07(["p:P8532"])
bind07 --> bind0
bind08(["p:P9015"])
bind08 --> bind0
bind09(["p:P10236"])
bind09 --> bind0
bind010(["p:P10481"])
bind010 --> bind0
bind011(["p:P12042"])
bind011 --> bind0
bind012(["p:P12109"])
bind012 --> bind0
bind013(["p:P12116"])
bind013 --> bind0
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v4 --"wikibase:propertyType"--> c5
v4 --"wikibase:claim"--> v2
v4 --"wikibase:statementProperty"--> v5
a2 -->v5--> v6
v3 -->v2--> a2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P195".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P217".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P407".-> v9
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P1574".-> v10
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P571".-> v11
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P1071".-> v12
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P2048".-> v13
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P2049".-> v14
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P9302".-> v15
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c18 --"wikibase:language"--> c20
end
bind11[/"count(?item)"/]
v3 --o bind11
bind11 --as--o v16
bind12[/"count(?coll)"/]
v7 --o bind12
bind12 --as--o v17
bind13[/"count(?inv_no)"/]
v8 --o bind13
bind13 --as--o v18
bind14[/"count(?lang)"/]
v9 --o bind14
bind14 --as--o v19
bind15[/"count(?exemp)"/]
v10 --o bind15
bind15 --as--o v20
bind16[/"count(?incep)"/]
v11 --o bind16
bind16 --as--o v21
bind17[/"count(?creat)"/]
v12 --o bind17
bind17 --as--o v22
bind18[/"count(?h)"/]
v13 --o bind18
bind18 --as--o v23
bind19[/"count(?w)"/]
v14 --o bind19
bind19 --as--o v24
bind20[/"count(?scrip)"/]
v15 --o bind20
bind20 --as--o v25