query-f6ee149770471e1e57154f99140a4462
Tackling Statements without ReferencesItems for museums in Switzerland containing statements that are not properly referenced, detailing the statements in question.
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 prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?property ?propertyLabel ?statement
WHERE {
{
SELECT ?item ?property ?statement WHERE {
{
SELECT DISTINCT ?item WHERE {
?item wdt:P31/wdt:P279* wd:Q33506;
wdt:P17 wd:Q39.
}
}
?property wikibase:claim ?p.
?item ?p ?statement.
MINUS {
# TODO check what counts as good reference
?statement prov:wasDerivedFrom [
pr:P248|pr:P854 ?goodReference
].
}
# TODO expand list of properties that don’t need good references:
FILTER(?p NOT IN (p:P373, #commons category
p:P856, #official website
p:P18, #image
p:P227, #identifier with weblink
p:P214, #identifier with weblink
p:P269, #identifier with weblink
p:P2427, #identifier with weblink
p:P213, #identifier with weblink
p:P4678, #identifier with weblink
p:P3153, #identifier with weblink
p:P902 #identifier with weblink
))
}
}
{
SELECT ?item ?itemLabel WHERE {
{
SELECT DISTINCT ?item WHERE {
?item wdt:P31/wdt:P279* wd:Q33506;
wdt:P17 wd:Q39.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,fr,it,en". }
}
}
{
SELECT ?property ?propertyLabel WHERE {
{
SELECT DISTINCT ?property WHERE {
INCLUDE %statements.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,fr,it,en". }
}
}
} ORDER BY ?item