query-3649f3447d6783407227bd3a59d77180
From Canada, has Wikitree, does not have FamilySearch 15:12, 11 October 2020 (UTC)) talk (ZanimumHello! Could I request that someone write a query for records where the person is from Canada (per P27), has a value for WikiTree person ID, but does not have a value for FamilySearch person ID, please? Thanks! -- FamilySearch person ID (P2889) WikiTree person ID (P2949) Canada (Q16) country of citizenship (P27)
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 bd: <http://www.bigdata.com/rdf#>
SELECT
?item ?itemLabel ?itemDescription
?wt
?dob ?dod
?pob ?pobLabel ?cobLabel
?pod ?podLabel ?codLabel
?st ?sl ?ids
WHERE
{
?item wdt:P27 wd:Q16 .
?item wdt:P2949 ?wt .
MINUS { ?item wdt:P2889 [] }
OPTIONAL { ?item wdt:P569 ?dob }
OPTIONAL { ?item wdt:P570 ?dod }
OPTIONAL { ?item wdt:P19 ?pob . ?pob wdt:P17 ?cob }
OPTIONAL { ?item wdt:P20 ?pod . ?pod wdt:P17 ?cod }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }
?item wikibase:statements ?st ; wikibase:sitelinks ?sl ; wikibase:identifiers ?ids
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?cob")
v8("?cod")
v3("?dob"):::projected
v4("?dod"):::projected
v11("?ids"):::projected
v1("?item"):::projected
v5("?pob"):::projected
v7("?pod"):::projected
v10("?sl"):::projected
v9("?st"):::projected
v2("?wt"):::projected
a1((" "))
c13(["#91;AUTO_LANGUAGE#93;,en,fr"]):::literal
c2(["wd:Q16"]):::iri
c11(["bd:serviceParam"]):::iri
v1 --"wdt:P27"--> c2
v1 --"wdt:P2949"--> v2
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P2889"--> a1
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P569".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P570".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P19".-> v5
v5 --"wdt:P17"--> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P20".-> v7
v7 --"wdt:P17"--> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
v1 --"wikibase:statements"--> v9
v1 --"wikibase:sitelinks"--> v10
v1 --"wikibase:identifiers"--> v11