Quality control queries: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 14: | Line 14: | ||
</pre> | </pre> | ||
== Missing instance statements == | == Missing "copy of" statements == | ||
Get a list of copies that lack an "copy of" statement: | |||
<pre> | |||
# Copies without Copy of statement. | |||
SELECT ?copy ?copyLabel | |||
WHERE | |||
{ | |||
?copy wdt:P8 wd:Q8 . | |||
MINUS { ?copy wdt:P41 [] } . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } | |||
} | |||
ORDER BY ?copyLabel | |||
</pre> | |||
== Missing "issue of" statements == | |||
Get a list of copies that lack an "copy of" statement: | |||
<pre> | |||
# Issues without Issue of statement. | |||
SELECT ?issue ?issueLabel | |||
WHERE | |||
{ | |||
?copy wdt:P8 wd:Q739 . | |||
MINUS { ?copy wdt:P111 [] } . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } | |||
} | |||
ORDER BY ?issueLabel | |||
</pre> | |||
== Missing instance statements (NEEDS REVISION) == | |||
Get a list of Item pages that lack an "instance of" declaration: | Get a list of Item pages that lack an "instance of" declaration: | ||
<pre> | <pre> | ||
| Line 47: | Line 77: | ||
ORDER BY ?placeLabel | ORDER BY ?placeLabel | ||
== Checking in on the Andrews List editions == | == Checking in on the Andrews List editions (NEEDS REVISION)== | ||
<pre> | <pre> | ||
# list of editions associated with the Andrews bibliography | # list of editions associated with the Andrews bibliography | ||
Revision as of 18:54, 9 June 2025
Missing "edition of" statements
Get a list of editions that lack an "edition of" statement:
# Editions without Edition of statement.
SELECT ?edition ?editionLabel
WHERE
{
?edition wdt:P8 wd:Q7 .
MINUS { ?edition wdt:P13 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?editionLabel
Missing "copy of" statements
Get a list of copies that lack an "copy of" statement:
# Copies without Copy of statement.
SELECT ?copy ?copyLabel
WHERE
{
?copy wdt:P8 wd:Q8 .
MINUS { ?copy wdt:P41 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?copyLabel
Missing "issue of" statements
Get a list of copies that lack an "copy of" statement:
# Issues without Issue of statement.
SELECT ?issue ?issueLabel
WHERE
{
?copy wdt:P8 wd:Q739 .
MINUS { ?copy wdt:P111 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?issueLabel
Missing instance statements (NEEDS REVISION)
Get a list of Item pages that lack an "instance of" declaration:
# Return all items that are missing an "instance of" statement
prefix wbb: <http://wikiba.se/ontology-beta#>
prefix wb: <http://wikiba.se/ontology#>
SELECT ?label ?link
WHERE
{
?item rdf:type ?wbitem ;
rdfs:label ?label .
FILTER(?wbitem in (wbb:Item, wb:Item))
FILTER((LANG(?label)) = "en")
FILTER NOT EXISTS { ?item wdt:P8 ?type }
BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?item) , 'http://wikibase.svc/entity/', '' ))) AS ?link )
}
order by ?label
Places without a Wikidata identifier (also check if they are really places)
# Places without Wikidata identifier statement.
SELECT ?place ?placeLabel
WHERE
{
?place wdt:P8 wd:Q10 .
MINUS { ?place wdt:P107 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?placeLabel
== Checking in on the Andrews List editions (NEEDS REVISION)==
<pre>
# list of editions associated with the Andrews bibliography
SELECT
?editionLabel
?link
(group_concat(distinct ?publisherLabel;separator='; ') as ?publishers)
(group_concat(distinct ?pubPlaceLabel;separator='; ') as ?publishedPlaces)
(group_concat(distinct ?pubDate;separator='; ') as ?publishedDates)
(group_concat(distinct ?printerLabel;separator='; ') as ?printers)
(group_concat(distinct ?printPlaceLabel;separator='; ') as ?printedPlaces)
(group_concat(distinct ?printDate;separator='; ') as ?printedDates)
WHERE {
?edition wdt:P121 wd:Q1176 ; #wd:Q1176 is the Andrews bibliography
rdfs:label ?editionLabel .
OPTIONAL {?edition wdt:P29 ?publisher . ?publisher rdfs:label ?publisherLabel }.
OPTIONAL {?edition ?has ?pubStmt . ?pubStmt ps:P29 ?publisher ; pq:P30 ?pubPlace . ?pubPlace rdfs:label ?pubPlaceLabel }.
OPTIONAL {?edition ?has ?pubStmt . ?pubStmt ps:P29 ?publisher ; pq:P31 ?pubDate }.
OPTIONAL {?edition wdt:P32 ?printer . ?printer rdfs:label ?printerLabel }.
OPTIONAL {?edition ?has ?printStmt . ?printStmt ps:P32 ?printer ; pq:P30 ?printPlace . ?printPlace rdfs:label ?printPlaceLabel }.
OPTIONAL {?edition ?has ?printStmt . ?printStmt ps:P32 ?printer ; pq:P31 ?printDate }.
BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?edition) , 'http://wikibase.svc/entity/', '' ))) AS ?link )
}
group by ?editionLabel ?link