579
edits
Line 1,413: | Line 1,413: | ||
order by ?personLabel ?id_label ?id_no | order by ?personLabel ?id_label ?id_no | ||
</sparql> | |||
=== What external IDs are available in Wikidata for women in the BN database? === | |||
<sparql tryit="1"> | |||
# All the external IDs on women's Wikidata pages, with counts | |||
# Another slow one... | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | |||
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | |||
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/> | |||
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/> | |||
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/> | |||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | |||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | |||
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |||
PREFIX wd: <http://www.wikidata.org/entity/> | |||
SELECT ?p ?prop_label (count(?prop_label) as ?count) | |||
WHERE { | |||
?person bnwdt:P3 bnwd:Q3 . #select women | |||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | |||
?person bnp:P117 ?wikidata_ID . # wikidata ID | |||
?wikidata_ID bnpq:P14 ?wikidata_url . | |||
BIND(IRI(REPLACE(?wikidata_url,"https://www.wikidata.org/wiki/","http://www.wikidata.org/entity/")) as ?wikidata ) | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?wikidata ?p ?s . | |||
?prop wikibase:claim ?p; | |||
wikibase:statementValue ?psv ; | |||
wikibase:propertyType ?prop_type. # property type | |||
?prop rdfs:label ?prop_label. filter(lang(?prop_label)="en") . | |||
# filter by property type | |||
filter(?prop_type in (wikibase:ExternalId) ) . | |||
} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
group by ?p ?prop_label | |||
ORDER BY desc(?count) | |||
</sparql> | </sparql> |
edits