query-df3e48d9a20aae2b4d1ed3626b611e76
title:P19 referenced only from a Wikimedia project [NOT REALLY WORKING] SELECT ?item (COUNT(DISTINCT ?st) AS ?nst) (COUNT(DISTINCT ?ref) AS ?nref) #conteggio di statements e fonti WHERE { ?item wdt:P1986 ?dbi; wdt:P396 ?sbn; p:P19 ?st. ?st prov:wasDerivedFrom ?ref. ?ref pr:P143 []. #importato da qualsiasi progetto wiki } GROUP BY ?item HAVING(?nref=1) #con una sola fonte
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
#title:P19 referenced only from a Wikimedia project [NOT REALLY WORKING]
SELECT ?item (COUNT(DISTINCT ?st) AS ?nst) (COUNT(DISTINCT ?ref) AS ?nref) #conteggio di statements e fonti
WHERE
{
?item wdt:P1986 ?dbi; wdt:P396 ?sbn; p:P19 ?st.
?st prov:wasDerivedFrom ?ref.
?ref pr:P143 []. #importato da qualsiasi progetto wiki
}
GROUP BY ?item
HAVING(?nref=1) #con una sola fonte
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?dbi")
v2("?item"):::projected
v8("?nref")
v7("?nst")
v6("?ref"):::projected
v4("?sbn")
v5("?st"):::projected
a1((" "))
f0[["?nref = '1^^xsd:integer'"]]
f0 --> v8
v2 --"p:direct/P1986"--> v3
v2 --"p:direct/P396"--> v4
v2 --"p:P19"--> v5
v5 --"prov:wasDerivedFrom"--> v6
v6 --"p:reference/P143"--> a1
bind3[/"count(?st)"/]
v5 --o bind3
bind3 --as--o v7
bind4[/"count(?ref)"/]
v6 --o bind4
bind4 --as--o v8