query-e28529e00bf242d834bbcb7c251d95cf

rq turtle/ttl

: Here is an overview. Some of the values will contain several triplets for precision, normalized value, unit, globe, calendar model and others. Cases of novalues are not counted. Jura1@ 06:35, 28 April 2020 (UTC) JuraString datatype = 5: 1 with wdt:, 4 (p:, wikibase:rank, rdf:type, ps:) --- 06:18, 28 April 2020 (UTC) JuraI think it still underestimates it. The addition of a statement adds several triples. The exact number varies by datatype (do we have that somewhere?). --- 06:10, 28 April 2020 (UTC)) talk (Dipsacus fullonum: You are counting statements twice because of the union, and three times for truthy statements. --Jura1@

Use at

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?datatype (COUNT(?c) as ?count) (SAMPLE(?q) as ?per) (?per * ?count as ?all) 
WHERE
{

    wd:Q30 ?b ?c . 
    ?prop wikibase:claim ?b .
    ?prop wikibase:propertyType ?datatype .
    OPTIONAL { ?typeitem wdt:P856 ?datatype ; p:P2670 
                         [ ps:P2670 wd:Q3539534 ; pq:P1114 ?q ; pq:P1013 wd:Q20950365 ] .}
}
GROUP BY ?datatype
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?all") v2("?b") v3("?c"):::projected v8("?count"):::projected v5("?datatype"):::projected v8("?per"):::projected v4("?prop") v7("?q"):::projected v6("?typeitem") a1((" ")) c1(["wd:Q30"]):::iri c6(["wd:Q3539534"]):::iri c9(["wd:Q20950365"]):::iri c1 -->v2--> v3 v4 --"wikibase:claim"--> v2 v4 --"wikibase:propertyType"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -."p:direct/P856".-> v5 a1 --"p:statement/P2670"--> c6 a1 --"p:qualifier/P1114"--> v7 a1 --"p:qualifier/P1013"--> c9 v6 --"p:P2670"--> a1 end bind2[/"count(?c)"/] v3 --o bind2 bind2 --as--o v8 bind3[/"sample(?q)"/] v7 --o bind3 bind3 --as--o v8 bind4[/"?per * ?count"/] v8 --o bind4 v8 --o bind4 bind4 --as--o v9