User:Daniel Mietchen/sandbox

The following query uses these:

  • Properties: instance of (P31)  View with Reasonator View with SQID, educated at (P69)  View with Reasonator View with SQID, place of birth (P19)  View with Reasonator View with SQID, image (P18)  View with Reasonator View with SQID, occupation (P106)  View with Reasonator View with SQID, sex or gender (P21)  View with Reasonator View with SQID, country (P17)  View with Reasonator View with SQID, date of birth (P569)  View with Reasonator View with SQID
    #defaultView:Timeline
    SELECT DISTINCT ?Person ?personLabel ?dob ?Gender ?Country ?article ?precision (MAX(?image) AS ?image) (MAX(?Occupation) AS ?Occupation) ?rank
    WHERE {
    
    
        ?person wdt:P31 wd:Q5 . # human
        ?person wdt:P69 wd:Q319239 . #PlaceOfEducation
        ?person wdt:P19 ?birthPlace .
        OPTIONAL { ?person wdt:P18 ?image .} #image
        OPTIONAL { ?person wdt:P106 ?occupation .} #occupation
        OPTIONAL { ?person wdt:P21 ?gender .} #gender
        OPTIONAL { ?birthPlace wdt:P17 ?country } #place of birth
        ?person p:P569/psv:P569 ?dobNode . #date of birth
        ?dobNode wikibase:timeValue ?dob .
        ?dobNode wikibase:timePrecision ?precision .
        ?article schema:about ?person .
        ?article schema:isPartOf <https://en.wikipedia.org/>.
    
       ?person wikibase:sitelinks ?rank .
    
        SERVICE wikibase:label {
           bd:serviceParam wikibase:language "en".
    ?gender rdfs:label ?Gender .
    ?person rdfs:label ?Person .
    ?country rdfs:label ?Country .
    ?occupation rdfs:label ?Occupation.
        }
    }
    GROUP BY ?Person ?personLabel ?dob ?Gender ?Country ?article ?precision ?rank
    ORDER BY DESC (?rank)