query-8675a8638123485d5d5d497e0e08245e

rq turtle/ttl

Edinburgh U.-educated women by birth-place SELECT ?person ?personLabel (SAMPLE(?birth_date) as ?birth_date) (SAMPLE(?death_date ) as ?death_date ) (SAMPLE(?birth_place_label ) as ?birth_place_label ) (SAMPLE(?birth_place_coords ) as ?birth_place_coords ) (SAMPLE(?image ) as ?image ) (SAMPLE(?country ) as ?country) (COUNT(?article) as ?rank) WHERE {
?person wdt:P69 wd:Q160302 . ?person wdt:P31 wd:Q5 . ?person wdt:P21 wd:Q6581072 .

OPTIONAL {?person wdt:P18 ?image }
OPTIONAL {?person wdt:P18 ?image }
OPTIONAL {?person wdt:P569 ?birth_date }
OPTIONAL {?person wdt:P27 ?countryItem .
          ?countryItem rdfs:label ?country filter (lang(?country) = "en")
     }
OPTIONAL {
         ?person wdt:P19 ?birth_place . 
         ?birth_place wdt:P625 ?birth_place_coords .
         ?birth_place rdfs:label ?birth_place_label filter ( lang(?birth_place_label) = "en" )
     }
OPTIONAL {?person wdt:P570 ?death_date } 
OPTIONAL {?article schema:about ?person}

SERVICE wikibase:label {bd:serviceParam wikibase:language "en" } }

GROUP BY ?person ?personLabel ORDER BY DESC(?rank)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Edinburgh U.-educated women by birth-place
SELECT ?person ?personLabel 
(SAMPLE(?birth_date) as ?birth_date) 
(SAMPLE(?death_date ) as ?death_date ) 
(SAMPLE(?birth_place_label ) as ?birth_place_label ) 
(SAMPLE(?birth_place_coords ) as ?birth_place_coords ) 
(SAMPLE(?image ) as ?image ) 
(SAMPLE(?country ) as ?country) 
(COUNT(?article) as ?rank)
WHERE 
{    
    ?person wdt:P69 wd:Q160302 .
    ?person wdt:P31 wd:Q5 .
    ?person wdt:P21 wd:Q6581072 .

    OPTIONAL {?person wdt:P18 ?image }
    OPTIONAL {?person wdt:P18 ?image }
    OPTIONAL {?person wdt:P569 ?birth_date }
    OPTIONAL {?person wdt:P27 ?countryItem .
              ?countryItem rdfs:label ?country filter (lang(?country) = "en")
         }
    OPTIONAL {
             ?person wdt:P19 ?birth_place . 
             ?birth_place wdt:P625 ?birth_place_coords .
             ?birth_place rdfs:label ?birth_place_label filter ( lang(?birth_place_label) = "en" )
         }
    OPTIONAL {?person wdt:P570 ?death_date } 
    OPTIONAL {?article schema:about ?person}     

 SERVICE wikibase:label {bd:serviceParam wikibase:language "en" }
}


GROUP BY ?person ?personLabel
ORDER BY DESC(?rank)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?article"):::projected v12("?birth_date"):::projected v8("?birth_place") v12("?birth_place_coords"):::projected v12("?birth_place_label"):::projected v12("?country"):::projected v7("?countryItem") v12("?death_date"):::projected v12("?image"):::projected v4("?person"):::projected v12("?rank") c1(["en"]):::literal c3(["wd:Q160302"]):::iri c7(["wd:Q6581072"]):::iri c17(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri v4 --"wdt:P69"--> c3 v4 --"wdt:P31"--> c5 v4 --"wdt:P21"--> c7 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P18".-> v12 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P18".-> v12 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P569".-> v12 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P27".-> v7 v7 --"rdfs:label"--> v12 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P19".-> v8 v8 --"wdt:P625"--> v12 v8 --"rdfs:label"--> v12 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P570".-> v12 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v11 -."schema:about".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c17 --"wikibase:language"--> c1 end bind7[/"sample(?birth_date)"/] v12 --o bind7 bind7 --as--o v12 bind8[/"sample(?death_date)"/] v12 --o bind8 bind8 --as--o v12 bind9[/"sample(?birth_place_label)"/] v12 --o bind9 bind9 --as--o v12 bind10[/"sample(?birth_place_coords)"/] v12 --o bind10 bind10 --as--o v12 bind11[/"sample(?image)"/] v12 --o bind11 bind11 --as--o v12 bind12[/"sample(?country)"/] v12 --o bind12 bind12 --as--o v12 bind13[/"count(?article)"/] v11 --o bind13 bind13 --as--o v12