Wikidata:VIAF/partner
Queries regarding VIAF edit
#Basic query looking for Wikidata items regarding humans having VIAF - may timeout
SELECT ?item ?value
{
?item wdt:P214 ?value .
?item wdt:P31 wd:Q5 .
}
ORDER BY ?item
#Wikidata properties representing VIAF source IDs
SELECT ?id ?idLabel ?partnerid
{
?id wdt:P31 wd:Q55586529 ;
p:P1552 [ ps:P1552 wd:Q26921380; pq:P3295 ?partnerid] .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?partnerid
#Wikidata properties representing VIAF source IDs, with more data
SELECT ?prop ?propLabel ?partnerid ?countryLabel (URI(CONCAT("https://mix-n-match.toolforge.org/#/catalog/",?MnMid)) AS ?MnM)
WHERE {
?prop wdt:P31 wd:Q55586529 ;
p:P1552 [ ps:P1552 wd:Q26921380; pq:P3295 ?partnerid] .
OPTIONAL {?prop wdt:P17 ?country}
OPTIONAL {?prop wdt:P2264 ?MnMid}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?propLabel
#Wikidata properties representing VIAF source IDs, with number of items using them and number of values of them (only main values with best rank), total number of IDs and Mix'n'match catalog - may sometimes timeout
SELECT ?id ?idLabel ?cod ?items_with_property ?uses_of_property ?number_of_ids (URI(CONCAT("https://mix-n-match.toolforge.org/#/catalog/",?MnMid)) AS ?MnM)
WHERE
{
{
SELECT ?id ?cod
(COUNT(DISTINCT(?item)) as ?items_with_property)
(COUNT(?value) as ?uses_of_property)
WHERE
{
?id wdt:P31 wd:Q55586529 ;
p:P1552 [ ps:P1552 wd:Q26921380; pq:P3295 ?cod ] .
?id wikibase:claim ?claim.
?item ?claim ?value.
OPTIONAL { ?p wdt:P4876 ?number_of_ids . }
OPTIONAL { ?p wdt:P2264 ?MnMid . }
}
GROUP BY ?id ?cod
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?cod
Related queries edit
#Wikidata authority control properties related to libraries which are not VIAF source IDs, with total number of IDs and Mix'n'match catalog
SELECT ?p ?pLabel ?pDescription ?number_of_ids (URI(CONCAT("https://mix-n-match.toolforge.org/#/catalog/",?MnMid)) AS ?MnM)
WHERE {
?p wdt:P31 wd:Q96776953 .
MINUS { ?p wdt:P31/wdt:P279* wd:Q55586529 . }
OPTIONAL { ?p wdt:P4876 ?number_of_ids . }
OPTIONAL { ?p wdt:P2264 ?MnMid . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
#Wikidata authority control properties related to libraries which are not VIAF source IDs, with number of items using them and number of values of them (only main values with best rank), total number of IDs and Mix'n'match catalog - may sometimes timeout
SELECT ?p ?pLabel ?items_with_property ?uses_of_property ?number_of_ids (URI(CONCAT("https://mix-n-match.toolforge.org/#/catalog/",?MnMid)) AS ?MnM)
WHERE
{
{
SELECT ?p ?number_of_ids ?MnMid
(COUNT(DISTINCT(?item)) as ?items_with_property)
(COUNT(?value) as ?uses_of_property)
WHERE
{
?p wdt:P31 wd:Q96776953 .
MINUS { ?p wdt:P31/wdt:P279* wd:Q55586529 . }
?p wikibase:claim ?claim.
?item ?claim ?value.
OPTIONAL { ?p wdt:P4876 ?number_of_ids . }
OPTIONAL { ?p wdt:P2264 ?MnMid . }
}
GROUP BY ?p ?number_of_ids ?MnMid
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
#Wikidata generic authority control properties which are not VIAF source IDs, with total number of IDs and Mix'n'match catalog
SELECT ?p ?pLabel ?pDescription ?number_of_ids (URI(CONCAT("https://mix-n-match.toolforge.org/#/catalog/",?MnMid)) AS ?MnM)
WHERE {
?p wdt:P31/wdt:P279* wd:Q18614948 .
MINUS { ?p wdt:P31/wdt:P279* wd:Q55586529 . }
OPTIONAL { ?p wdt:P4876 ?number_of_ids . }
OPTIONAL { ?p wdt:P2264 ?MnMid . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?number_of_ids)