söndag 31 juli 2016

P54 members of a team that play icehockey Q41466 and in the National Icehockey League

# Query Find all P54 members of a team that play icehockey Q41466 and in the National Icehockey League
#
#defaultView:ImageGrid
SELECT DISTINCT ?person ?personLabel ?personDescription ?dateofBirth ?placeOfBirthLabel ?dateofDeath ?WikiTreeIDf ?findAGravef ?wikiTreeIDf ?genealogicsf ?pic  WHERE

{
?icehockeyTeam  wdt:P641 wd:Q41466 . # Team is a icehockey Team
        ?icehockeyTeam  wdt:P118 wd:Q1215892 . # Team has been in the National Hockey League

  ?person wdt:P54 ?icehockeyTeam . # person in this team
  ?person wdt:P31 wd:Q5 .
OPTIONAL {?person wdt:P535 ?findAGrave } # FindAGraveID
        OPTIONAL {?person wdt:P1819 ?genealogics }   # Genealogics
{?person wdt:P2949 ?wikiTreeID } # WikiTreeID

        OPTIONAL {?person wdt:P569 ?dateOfBirth }
        OPTIONAL {?person wdt:P19 ?placeOfBirth } # Birth location
#    OPTIONAL {?placeOfBirth wdt:P625 ?coord1 } .    # Get coordinates of Place of birth

       OPTIONAL {?person wdt:P570 ?dateofDeath } # Deathdate
       OPTIONAL {?person wdt:P20 ?deathLoc } # Death location
#    OPTIONAL {?deathLoc wdt:P625 ?coord2 } .   # Get coordinates from Place of death

      OPTIONAL {?person wdt:P119 ?placeOfBurial } # Burial location
#    OPTIONAL {?placeOfBurial wdt:P625 ?coord3 } .  # Get coordinates from Place of burial

    OPTIONAL {?person wdt:P18 ?pic}   # picture

    BIND (URI(CONCAT("http://www.wikitree.com/wiki/",?wikiTreeID)) AS ?wikiTreeIDf)
    BIND (URI(CONCAT("http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&df=all&GRid=",?findAGrave)) AS ?findAGravef)
    BIND (URI(CONCAT("http://www.genealogics.org/getperson.php?tree=LEO&personID=",?genealogics)) AS ?genealogicsf)
#    BIND (URI(CONCAT("https://www.facebook.com/",?FB)) AS ?FBf)
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en","fr". } #English
}
Order By (?dateOfBirth)
LIMIT 10000

Inga kommentarer:

Skicka en kommentar