query-c800aa952991f245b4908e5806038960

rq turtle/ttl

Mujeres mexicanas SELECT ?item ?name ?image ?gender ?year_of_birth ?country_of_birth ?year_of_death ?country_of_death (GROUP_CONCAT(?occupation; SEPARATOR=", ") AS ?occupations) WHERE { ?item wdt:P21 wd:Q6581072 . ?item wdt:P27 wd:Q96 . OPTIONAL { ?item wdt:P18 ?image. } OPTIONAL { ?item wdt:P21 ?gender_item. } ?item wdt:P569 ?date_of_birth. BIND (YEAR(?date_of_birth) AS ?year_of_birth) FILTER (?year_of_birth >= 1675 && ?year_of_birth < 1995) OPTIONAL { ?item wdt:P19/wdt:P17 ?country_of_birth_item. } OPTIONAL { ?item wdt:P570 ?date_of_death. BIND (YEAR(?date_of_death) AS ?year_of_death) } OPTIONAL { ?item wdt:P20/wdt:P17 ?country_of_death_item. } OPTIONAL { ?item wdt:P106 ?occupation_item. } SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". ?item rdfs:label ?name. ?gender_item rdfs:label ?gender. ?country_of_birth_item rdfs:label ?country_of_birth. ?country_of_death_item rdfs:label ?country_of_death. ?occupation_item rdfs:label ?occupation. } } GROUP BY ?item ?name ?image ?gender ?year_of_birth ?country_of_birth ?year_of_death ?country_of_death

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Mujeres mexicanas
SELECT ?item ?name ?image ?gender ?year_of_birth ?country_of_birth
       ?year_of_death ?country_of_death
       (GROUP_CONCAT(?occupation; SEPARATOR=", ") AS ?occupations)
WHERE
{
  ?item wdt:P21 wd:Q6581072 .
  ?item wdt:P27 wd:Q96 .
  OPTIONAL {
    ?item wdt:P18 ?image.
  }
  OPTIONAL {
    ?item wdt:P21 ?gender_item.
  }
  ?item wdt:P569 ?date_of_birth.
  BIND (YEAR(?date_of_birth) AS ?year_of_birth)
  FILTER (?year_of_birth >= 1675 && ?year_of_birth < 1995)
  OPTIONAL {
    ?item wdt:P19/wdt:P17 ?country_of_birth_item.
  }
  OPTIONAL {
    ?item wdt:P570 ?date_of_death.
    BIND (YEAR(?date_of_death) AS ?year_of_death)
  }
  OPTIONAL {
    ?item wdt:P20/wdt:P17 ?country_of_death_item.
  }
  OPTIONAL {
    ?item wdt:P106 ?occupation_item.
  }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "es,en".
    ?item rdfs:label ?name.
    ?gender_item rdfs:label ?gender.
    ?country_of_birth_item rdfs:label ?country_of_birth.
    ?country_of_death_item rdfs:label ?country_of_death.
    ?occupation_item rdfs:label ?occupation.
  }
}
GROUP BY ?item ?name ?image ?gender ?year_of_birth ?country_of_birth ?year_of_death ?country_of_death

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v13("?country_of_birth"):::projected v6("?country_of_birth_item") v14("?country_of_death"):::projected v9("?country_of_death_item") v5("?date_of_birth") v7("?date_of_death") v12("?gender"):::projected v4("?gender_item") v3("?image"):::projected v2("?item"):::projected v11("?name"):::projected v15("?occupation"):::projected v10("?occupation_item") v16("?occupations") v6("?year_of_birth"):::projected v8("?year_of_death"):::projected a1((" ")) a2((" ")) c17(["es,en"]):::literal c6(["wd:Q96"]):::iri c4(["wd:Q6581072"]):::iri c15(["bd:serviceParam"]):::iri f0[["?year_of_birth >= '1675^^xsd:integer'?year_of_birth < '1995^^xsd:integer'"]] f0 --> v6 v2 --"wdt:P21"--> c4 v2 --"wdt:P27"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P18".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P21".-> v4 end v2 --"wdt:P569"--> v5 bind1[/"year-from-dateTime(?date_of_birth)"/] v5 --o bind1 bind1 --as--o v6 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P19".-> a1 a1 --"wdt:P17"--> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v7 bind2[/"year-from-dateTime(?date_of_death)"/] v7 --o bind2 bind2 --as--o v8 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P20".-> a2 a2 --"wdt:P17"--> v9 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P106".-> v10 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c15 --"wikibase:language"--> c17 v2 --"rdfs:label"--> v11 v4 --"rdfs:label"--> v12 v6 --"rdfs:label"--> v13 v9 --"rdfs:label"--> v14 v10 --"rdfs:label"--> v15 end bind4[/"?occupation"/] v15 --o bind4 bind4 --as--o v16