query-eee483bc68a017ededd9570157a117e9

rq turtle/ttl

Propertiesdate of birth (P569)date of death (P570)instance of (P31)sex or gender (P21)country of citizenship (P27)occupation (P106)place of birth (P19)father (P22)mother (P25)Freebase ID (P646)position played on team / speciality (P413)P7P9different from (P1889)said to be the same as (P460)

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item1 ?item2  ?d1
{
    ?item1 wdt:P569 ?d1 .
    FILTER (?d1 > "1980-01-01T00:00:00Z"^^xsd:dateTime && ?d1 < "1985-01-01T00:00:00Z"^^xsd:dateTime) .
    OPTIONAL { ?item1 wdt:P570 ?dummy1 } FILTER ( !bound(?dummy1) ) .
    ?item2 wdt:P569 ?d1 .
    OPTIONAL { ?item2 wdt:P570 ?dummy2 } FILTER ( !bound(?dummy2) ) . 
    ?item1 wdt:P31 wd:Q5 .
    ?item2 wdt:P31 wd:Q5 .
    ?item1 wdt:P21 ?g .
    ?item2 wdt:P21 ?g .
    OPTIONAL { ?item1 wdt:P27 ?l1 }     OPTIONAL { ?item2 wdt:P27 ?l2 }     FILTER ( !( BOUND(?l1) && BOUND(?l2) && ?l1 != ?l2) )
    OPTIONAL { ?item1 wdt:P106 ?n1}     OPTIONAL { ?item2 wdt:P106 ?n2}     FILTER ( !( BOUND(?n1) && BOUND(?n2) && ?n1 != ?n2) )
    OPTIONAL { ?item1 wdt:P19 ?b1 }     OPTIONAL { ?item2 wdt:P19 ?b2 }     FILTER ( !( BOUND(?b1) && BOUND(?b2) && ?b1 != ?b2) )
    OPTIONAL { ?item1 wdt:P22 ?f1 }     OPTIONAL { ?item2 wdt:P22 ?f2 }     FILTER ( !( BOUND(?f1) && BOUND(?f2) && ?f1 != ?f2) )
    OPTIONAL { ?item1 wdt:P25 ?m1 }     OPTIONAL { ?item2 wdt:P25 ?m2 }     FILTER ( !( BOUND(?m1) && BOUND(?m2) && ?m1 != ?m2) )
    OPTIONAL { ?item1 wdt:P646 ?z1 }    OPTIONAL { ?item2 wdt:P646 ?z2 }    FILTER ( !( BOUND(?z1) && BOUND(?z2) && ?z1 != ?z2) )
    OPTIONAL { ?item1 wdt:P413 ?w1 }    OPTIONAL { ?item2 wdt:P413 ?w2 }    FILTER ( !( BOUND(?w1) && BOUND(?w2) && ?w1 != ?w2) )  
    FILTER ( str(?item1) < str(?item2)  )
    MINUS { ?item1 wdt:P7 ?item2 }      MINUS { ?item1 wdt:P9 ?item2 }      # twins
    MINUS { ?item1 wdt:P1889 ?item2 }   MINUS { ?item1 wdt:P460 ?item2 }    # identified issues
}
LIMIT 50

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?b1") v12("?b2") v19("?d1"):::projected v18("?dummy1") v17("?dummy2") v9("?f1") v10("?f2") v20("?g") v1("?item1"):::projected v2("?item2"):::projected v15("?l1") v16("?l2") v7("?m1") v8("?m2") v13("?n1") v14("?n2") v3("?w1") v4("?w2") v5("?z1") v6("?z2") c6(["wd:Q5"]):::iri f0[["str(?item1) < str(?item2)"]] f0 --> v1 f0 --> v2 f1[["not bound(?w1)bound(?w2)?w1 != ?w2"]] f1 --> v3 f1 --> v4 f2[["not bound(?z1)bound(?z2)?z1 != ?z2"]] f2 --> v5 f2 --> v6 f3[["not bound(?m1)bound(?m2)?m1 != ?m2"]] f3 --> v7 f3 --> v8 f4[["not bound(?f1)bound(?f2)?f1 != ?f2"]] f4 --> v9 f4 --> v10 f5[["not bound(?b1)bound(?b2)?b1 != ?b2"]] f5 --> v11 f5 --> v12 f6[["not bound(?n1)bound(?n2)?n1 != ?n2"]] f6 --> v13 f6 --> v14 f7[["not bound(?l1)bound(?l2)?l1 != ?l2"]] f7 --> v15 f7 --> v16 f8[["not bound(?dummy2)"]] f8 --> v17 f9[["not bound(?dummy1)"]] f9 --> v18 f10[["?d1 > '1980-01-01T00:00:00Z^^xsd:dateTime'?d1 < '1985-01-01T00:00:00Z^^xsd:dateTime'"]] f10 --> v19 v1 --"wdt:P569"--> v19 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P570".-> v18 end v2 --"wdt:P569"--> v19 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v17 end v1 --"wdt:P31"--> c6 v2 --"wdt:P31"--> c6 v1 --"wdt:P21"--> v20 v2 --"wdt:P21"--> v20 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P27".-> v15 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P27".-> v16 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P106".-> v13 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P106".-> v14 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P19".-> v11 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P19".-> v12 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P22".-> v9 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P22".-> v10 end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P25".-> v7 end subgraph optional11["(optional)"] style optional11 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P25".-> v8 end subgraph optional12["(optional)"] style optional12 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P646".-> v5 end subgraph optional13["(optional)"] style optional13 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P646".-> v6 end subgraph optional14["(optional)"] style optional14 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P413".-> v3 end subgraph optional15["(optional)"] style optional15 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P413".-> v4 end subgraph minus11["MINUS"] style minus11 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P7"--> v2 end subgraph minus12["MINUS"] style minus12 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P9"--> v2 end subgraph minus13["MINUS"] style minus13 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1889"--> v2 end subgraph minus14["MINUS"] style minus14 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P460"--> v2 end