query-ef82bf6349f2e8d9682736d58e5256f6
Ratio of sourced claims (by source and property)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?refProp ?refPropLabel ?claimProp ?claimPropLabel ?cnt_all ?cnt_sourced ?sourced_ratio WHERE {
{
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim WHERE { VALUES (?refProp ?claimProp) {
(wd:P2091 wd:P21) (wd:P2091 wd:P27) (wd:P2091 wd:P1532) (wd:P2091 wd:P2048) (wd:P2091 wd:P2067) (wd:P2091 wd:P569) (wd:P2091 wd:P106) (wd:P2091 wd:P641) (wd:P2091 wd:P551) (wd:P2091 wd:P1416) (wd:P2091 wd:P54) (wd:P2091 wd:P463) (wd:P2091 wd:P1344) (wd:P2091 wd:P1559) (wd:P2091 wd:P1477) (wd:P2091 wd:P735) (wd:P2091 wd:P734)
#(wd:P1447 wd:P21) (wd:P1447 wd:P27) (wd:P1447 wd:P1532) (wd:P1447 wd:P2048) (wd:P1447 wd:P2067) (wd:P1447 wd:P569) (wd:P1447 wd:P19) (wd:P1447 wd:P570) (wd:P1447 wd:P20) (wd:P1447 wd:P106) (wd:P1447 wd:P641) (wd:P1447 wd:P1416) (wd:P1447 wd:P54) (wd:P1447 wd:P463) (wd:P1447 wd:P1344) (wd:P1447 wd:P1559) (wd:P1447 wd:P1477) (wd:P1447 wd:P735) (wd:P1447 wd:P734) (wd:P1447 wd:P25) (wd:P1447 wd:P22) (wd:P1447 wd:P3373) (wd:P1447 wd:P40) (wd:P1447 wd:P26) (wd:P1447 wd:P1038) (wd:P1447 wd:P451)
} ?refProp wikibase:directClaim ?wdt_ref; wikibase:reference ?pr_ref . ?claimProp wikibase:claim ?p_claim }
}. {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim (COUNT(DISTINCT ?s) AS ?cnt_all) WHERE { {
SELECT DISTINCT ?item ?s ?wdt_ref ?p_claim WHERE { {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim WHERE { VALUES (?refProp ?claimProp) {
(wd:P2091 wd:P21) (wd:P2091 wd:P27) (wd:P2091 wd:P1532) (wd:P2091 wd:P2048) (wd:P2091 wd:P2067) (wd:P2091 wd:P569) (wd:P2091 wd:P106) (wd:P2091 wd:P641) (wd:P2091 wd:P551) (wd:P2091 wd:P1416) (wd:P2091 wd:P54) (wd:P2091 wd:P463) (wd:P2091 wd:P1344) (wd:P2091 wd:P1559) (wd:P2091 wd:P1477) (wd:P2091 wd:P735) (wd:P2091 wd:P734)
#(wd:P1447 wd:P21) (wd:P1447 wd:P27) (wd:P1447 wd:P1532) (wd:P1447 wd:P2048) (wd:P1447 wd:P2067) (wd:P1447 wd:P569) (wd:P1447 wd:P19) (wd:P1447 wd:P570) (wd:P1447 wd:P20) (wd:P1447 wd:P106) (wd:P1447 wd:P641) (wd:P1447 wd:P1416) (wd:P1447 wd:P54) (wd:P1447 wd:P463) (wd:P1447 wd:P1344) (wd:P1447 wd:P1559) (wd:P1447 wd:P1477) (wd:P1447 wd:P735) (wd:P1447 wd:P734) (wd:P1447 wd:P25) (wd:P1447 wd:P22) (wd:P1447 wd:P3373) (wd:P1447 wd:P40) (wd:P1447 wd:P26) (wd:P1447 wd:P1038) (wd:P1447 wd:P451)
} ?refProp wikibase:directClaim ?wdt_ref; wikibase:reference ?pr_ref . ?claimProp wikibase:claim ?p_claim }
}. ?item p:P106/ps:P106/wdt:P279* wd:Q26270618; ?wdt_ref []; ?p_claim ?s }
}} GROUP BY ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim
}. {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim (COUNT(DISTINCT ?s) AS ?cnt_sourced) WHERE { {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim WHERE { VALUES (?refProp ?claimProp) {
(wd:P2091 wd:P21) (wd:P2091 wd:P27) (wd:P2091 wd:P1532) (wd:P2091 wd:P2048) (wd:P2091 wd:P2067) (wd:P2091 wd:P569) (wd:P2091 wd:P106) (wd:P2091 wd:P641) (wd:P2091 wd:P551) (wd:P2091 wd:P1416) (wd:P2091 wd:P54) (wd:P2091 wd:P463) (wd:P2091 wd:P1344) (wd:P2091 wd:P1559) (wd:P2091 wd:P1477) (wd:P2091 wd:P735) (wd:P2091 wd:P734)
#(wd:P1447 wd:P21) (wd:P1447 wd:P27) (wd:P1447 wd:P1532) (wd:P1447 wd:P2048) (wd:P1447 wd:P2067) (wd:P1447 wd:P569) (wd:P1447 wd:P19) (wd:P1447 wd:P570) (wd:P1447 wd:P20) (wd:P1447 wd:P106) (wd:P1447 wd:P641) (wd:P1447 wd:P1416) (wd:P1447 wd:P54) (wd:P1447 wd:P463) (wd:P1447 wd:P1344) (wd:P1447 wd:P1559) (wd:P1447 wd:P1477) (wd:P1447 wd:P735) (wd:P1447 wd:P734) (wd:P1447 wd:P25) (wd:P1447 wd:P22) (wd:P1447 wd:P3373) (wd:P1447 wd:P40) (wd:P1447 wd:P26) (wd:P1447 wd:P1038) (wd:P1447 wd:P451)
} ?refProp wikibase:directClaim ?wdt_ref; wikibase:reference ?pr_ref . ?claimProp wikibase:claim ?p_claim }
}. {
SELECT DISTINCT ?item ?s ?wdt_ref ?p_claim WHERE { {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim WHERE { VALUES (?refProp ?claimProp) {
(wd:P2091 wd:P21) (wd:P2091 wd:P27) (wd:P2091 wd:P1532) (wd:P2091 wd:P2048) (wd:P2091 wd:P2067) (wd:P2091 wd:P569) (wd:P2091 wd:P106) (wd:P2091 wd:P641) (wd:P2091 wd:P551) (wd:P2091 wd:P1416) (wd:P2091 wd:P54) (wd:P2091 wd:P463) (wd:P2091 wd:P1344) (wd:P2091 wd:P1559) (wd:P2091 wd:P1477) (wd:P2091 wd:P735) (wd:P2091 wd:P734)
#(wd:P1447 wd:P21) (wd:P1447 wd:P27) (wd:P1447 wd:P1532) (wd:P1447 wd:P2048) (wd:P1447 wd:P2067) (wd:P1447 wd:P569) (wd:P1447 wd:P19) (wd:P1447 wd:P570) (wd:P1447 wd:P20) (wd:P1447 wd:P106) (wd:P1447 wd:P641) (wd:P1447 wd:P1416) (wd:P1447 wd:P54) (wd:P1447 wd:P463) (wd:P1447 wd:P1344) (wd:P1447 wd:P1559) (wd:P1447 wd:P1477) (wd:P1447 wd:P735) (wd:P1447 wd:P734) (wd:P1447 wd:P25) (wd:P1447 wd:P22) (wd:P1447 wd:P3373) (wd:P1447 wd:P40) (wd:P1447 wd:P26) (wd:P1447 wd:P1038) (wd:P1447 wd:P451)
} ?refProp wikibase:directClaim ?wdt_ref; wikibase:reference ?pr_ref . ?claimProp wikibase:claim ?p_claim }
}. ?item p:P106/ps:P106/wdt:P279* wd:Q26270618; ?wdt_ref []; ?p_claim ?s }
}. ?s prov:wasDerivedFrom [ ?pr_ref [] ] } GROUP BY ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim
}. BIND(CONCAT(STR(ROUND(?cnt_sourced / ?cnt_all * 1000)/10), '%') AS ?sourced_ratio) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} ORDER BY ASC(xsd:integer(STRAFTER(STR(?claimProp), 'entity/P')))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?claimProp"):::projected
v8("?cnt_all"):::projected
v9("?cnt_sourced"):::projected
v6("?item")
v5("?p_claim")
v4("?pr_ref")
v9("?refProp"):::projected
v7("?s")
v10("?sourced_ratio"):::projected
v3("?wdt_ref")
a3((" "))
a6((" "))
a8((" "))
a1((" "))
a2((" "))
a4((" "))
a5((" "))
a7((" "))
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
c8(["wd:Q26270618"]):::iri
bind0[/VALUES ?claimProp ?refProp/]
bind0-->v9
bind0-->v9
bind00(["wd:P2091"])
bind00 --> bind0
bind01(["wd:P21"])
bind01 --> bind0
bind02(["wd:P2091"])
bind02 --> bind0
bind03(["wd:P27"])
bind03 --> bind0
bind04(["wd:P2091"])
bind04 --> bind0
bind05(["wd:P1532"])
bind05 --> bind0
bind06(["wd:P2091"])
bind06 --> bind0
bind07(["wd:P2048"])
bind07 --> bind0
bind08(["wd:P2091"])
bind08 --> bind0
bind09(["wd:P2067"])
bind09 --> bind0
bind010(["wd:P2091"])
bind010 --> bind0
bind011(["wd:P569"])
bind011 --> bind0
bind012(["wd:P2091"])
bind012 --> bind0
bind013(["wd:P106"])
bind013 --> bind0
bind014(["wd:P2091"])
bind014 --> bind0
bind015(["wd:P641"])
bind015 --> bind0
bind016(["wd:P2091"])
bind016 --> bind0
bind017(["wd:P551"])
bind017 --> bind0
bind018(["wd:P2091"])
bind018 --> bind0
bind019(["wd:P1416"])
bind019 --> bind0
bind020(["wd:P2091"])
bind020 --> bind0
bind021(["wd:P54"])
bind021 --> bind0
bind022(["wd:P2091"])
bind022 --> bind0
bind023(["wd:P463"])
bind023 --> bind0
bind024(["wd:P2091"])
bind024 --> bind0
bind025(["wd:P1344"])
bind025 --> bind0
bind026(["wd:P2091"])
bind026 --> bind0
bind027(["wd:P1559"])
bind027 --> bind0
bind028(["wd:P2091"])
bind028 --> bind0
bind029(["wd:P1477"])
bind029 --> bind0
bind030(["wd:P2091"])
bind030 --> bind0
bind031(["wd:P735"])
bind031 --> bind0
bind032(["wd:P2091"])
bind032 --> bind0
bind033(["wd:P734"])
bind033 --> bind0
v9 --"wikibase:directClaim"--> v3
v9 --"wikibase:reference"--> v4
v9 --"wikibase:claim"--> v5
bind1[/VALUES ?claimProp ?refProp/]
bind1-->v9
bind1-->v9
bind10(["wd:P2091"])
bind10 --> bind1
bind11(["wd:P21"])
bind11 --> bind1
bind12(["wd:P2091"])
bind12 --> bind1
bind13(["wd:P27"])
bind13 --> bind1
bind14(["wd:P2091"])
bind14 --> bind1
bind15(["wd:P1532"])
bind15 --> bind1
bind16(["wd:P2091"])
bind16 --> bind1
bind17(["wd:P2048"])
bind17 --> bind1
bind18(["wd:P2091"])
bind18 --> bind1
bind19(["wd:P2067"])
bind19 --> bind1
bind110(["wd:P2091"])
bind110 --> bind1
bind111(["wd:P569"])
bind111 --> bind1
bind112(["wd:P2091"])
bind112 --> bind1
bind113(["wd:P106"])
bind113 --> bind1
bind114(["wd:P2091"])
bind114 --> bind1
bind115(["wd:P641"])
bind115 --> bind1
bind116(["wd:P2091"])
bind116 --> bind1
bind117(["wd:P551"])
bind117 --> bind1
bind118(["wd:P2091"])
bind118 --> bind1
bind119(["wd:P1416"])
bind119 --> bind1
bind120(["wd:P2091"])
bind120 --> bind1
bind121(["wd:P54"])
bind121 --> bind1
bind122(["wd:P2091"])
bind122 --> bind1
bind123(["wd:P463"])
bind123 --> bind1
bind124(["wd:P2091"])
bind124 --> bind1
bind125(["wd:P1344"])
bind125 --> bind1
bind126(["wd:P2091"])
bind126 --> bind1
bind127(["wd:P1559"])
bind127 --> bind1
bind128(["wd:P2091"])
bind128 --> bind1
bind129(["wd:P1477"])
bind129 --> bind1
bind130(["wd:P2091"])
bind130 --> bind1
bind131(["wd:P735"])
bind131 --> bind1
bind132(["wd:P2091"])
bind132 --> bind1
bind133(["wd:P734"])
bind133 --> bind1
v9 --"wikibase:directClaim"--> v3
v9 --"wikibase:reference"--> v4
v9 --"wikibase:claim"--> v5
v6 --"p:P106"--> a1
a1 --"p:statement/P106"--> a2
a2 --"p:direct/P279"--> c8
v6 -->v3--> a3
v6 -->v5--> v7
bind3[/"count(?s)"/]
v7 --o bind3
bind3 --as--o v8
bind4[/VALUES ?claimProp ?refProp/]
bind4-->v9
bind4-->v9
bind40(["wd:P2091"])
bind40 --> bind4
bind41(["wd:P21"])
bind41 --> bind4
bind42(["wd:P2091"])
bind42 --> bind4
bind43(["wd:P27"])
bind43 --> bind4
bind44(["wd:P2091"])
bind44 --> bind4
bind45(["wd:P1532"])
bind45 --> bind4
bind46(["wd:P2091"])
bind46 --> bind4
bind47(["wd:P2048"])
bind47 --> bind4
bind48(["wd:P2091"])
bind48 --> bind4
bind49(["wd:P2067"])
bind49 --> bind4
bind410(["wd:P2091"])
bind410 --> bind4
bind411(["wd:P569"])
bind411 --> bind4
bind412(["wd:P2091"])
bind412 --> bind4
bind413(["wd:P106"])
bind413 --> bind4
bind414(["wd:P2091"])
bind414 --> bind4
bind415(["wd:P641"])
bind415 --> bind4
bind416(["wd:P2091"])
bind416 --> bind4
bind417(["wd:P551"])
bind417 --> bind4
bind418(["wd:P2091"])
bind418 --> bind4
bind419(["wd:P1416"])
bind419 --> bind4
bind420(["wd:P2091"])
bind420 --> bind4
bind421(["wd:P54"])
bind421 --> bind4
bind422(["wd:P2091"])
bind422 --> bind4
bind423(["wd:P463"])
bind423 --> bind4
bind424(["wd:P2091"])
bind424 --> bind4
bind425(["wd:P1344"])
bind425 --> bind4
bind426(["wd:P2091"])
bind426 --> bind4
bind427(["wd:P1559"])
bind427 --> bind4
bind428(["wd:P2091"])
bind428 --> bind4
bind429(["wd:P1477"])
bind429 --> bind4
bind430(["wd:P2091"])
bind430 --> bind4
bind431(["wd:P735"])
bind431 --> bind4
bind432(["wd:P2091"])
bind432 --> bind4
bind433(["wd:P734"])
bind433 --> bind4
v9 --"wikibase:directClaim"--> v3
v9 --"wikibase:reference"--> v4
v9 --"wikibase:claim"--> v5
bind5[/VALUES ?claimProp ?refProp/]
bind5-->v9
bind5-->v9
bind50(["wd:P2091"])
bind50 --> bind5
bind51(["wd:P21"])
bind51 --> bind5
bind52(["wd:P2091"])
bind52 --> bind5
bind53(["wd:P27"])
bind53 --> bind5
bind54(["wd:P2091"])
bind54 --> bind5
bind55(["wd:P1532"])
bind55 --> bind5
bind56(["wd:P2091"])
bind56 --> bind5
bind57(["wd:P2048"])
bind57 --> bind5
bind58(["wd:P2091"])
bind58 --> bind5
bind59(["wd:P2067"])
bind59 --> bind5
bind510(["wd:P2091"])
bind510 --> bind5
bind511(["wd:P569"])
bind511 --> bind5
bind512(["wd:P2091"])
bind512 --> bind5
bind513(["wd:P106"])
bind513 --> bind5
bind514(["wd:P2091"])
bind514 --> bind5
bind515(["wd:P641"])
bind515 --> bind5
bind516(["wd:P2091"])
bind516 --> bind5
bind517(["wd:P551"])
bind517 --> bind5
bind518(["wd:P2091"])
bind518 --> bind5
bind519(["wd:P1416"])
bind519 --> bind5
bind520(["wd:P2091"])
bind520 --> bind5
bind521(["wd:P54"])
bind521 --> bind5
bind522(["wd:P2091"])
bind522 --> bind5
bind523(["wd:P463"])
bind523 --> bind5
bind524(["wd:P2091"])
bind524 --> bind5
bind525(["wd:P1344"])
bind525 --> bind5
bind526(["wd:P2091"])
bind526 --> bind5
bind527(["wd:P1559"])
bind527 --> bind5
bind528(["wd:P2091"])
bind528 --> bind5
bind529(["wd:P1477"])
bind529 --> bind5
bind530(["wd:P2091"])
bind530 --> bind5
bind531(["wd:P735"])
bind531 --> bind5
bind532(["wd:P2091"])
bind532 --> bind5
bind533(["wd:P734"])
bind533 --> bind5
v9 --"wikibase:directClaim"--> v3
v9 --"wikibase:reference"--> v4
v9 --"wikibase:claim"--> v5
v6 --"p:P106"--> a4
a4 --"p:statement/P106"--> a5
a5 --"p:direct/P279"--> c8
v6 -->v3--> a6
v6 -->v5--> v7
a7 -->v4--> a8
v7 --"prov:wasDerivedFrom"--> a7
bind7[/"count(?s)"/]
v7 --o bind7
bind7 --as--o v9
bind8[/"concat(str(numeric-round(?cnt_sourced / ?cnt_all * '1000^^xsd:integer') / '10^^xsd:integer'),'%')"/]
v9 --o bind8
v8 --o bind8
bind8 --as--o v10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end