579
edits
(→IDs) |
|||
Line 1,369: | Line 1,369: | ||
</sparql> | </sparql> | ||
=== All external IDs on Wikidata for Women FSAs === | |||
<sparql tryit="1"> | |||
# Query to fetch all available External IDs on Wikidata for FSAs | |||
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 bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/> | |||
PREFIX bnpqv: <https://beyond-notability.wikibase.cloud/prop/qualifier/value/> | |||
SELECT distinct ?person ?personLabel ?wikidata ?p ?id_no ?id_label | |||
WHERE { | |||
?person bnwdt:P3 bnwd:Q3 . #select women | |||
?person bnwdt:P75 bnwd:Q8. # limit to FSAs... query will time out if you try to fetch all women. | |||
?person bnp:P117 ?wikidata_ID . #get 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:statementProperty ?ps; # NB rather than statementValue | |||
wikibase:propertyType ?prop_type. # possible to specify type ExternalId here and maybe speed it up? | |||
?prop rdfs:label ?id_label. filter(lang(?id_label)="en") . # ident name | |||
?s ?ps ?id_no . # id value | |||
# filter by property type | |||
filter(?prop_type in (wikibase:ExternalId ) ) . | |||
} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en, en-gb". } | |||
} | |||
order by ?personLabel ?id_label ?id_no | |||
</sparql> | |||
==Fishing Expeditions== | ==Fishing Expeditions== |
edits