query-c15e0c93e3e3de2be4f59f649f4d7c5a

rq turtle/ttl

Iranian female born in a city with a birth date > 1900 SELECT DISTINCT ?person ?personLabel ?birthplaceLabel ?birth_year ?sex_or_genderLabel ?coordinates (GROUP_CONCAT(DISTINCT ?occupationLabel; SEPARATOR=", ") AS ?occupations)

WHERE { ?person wdt:P31 wd:Q5; wdt:P19 ?birthplace; wdt:P21 wd:Q6581072; wdt:P106 ?occupation. ?birthplace wdt:P31/wdt:P279* wd:Q515; wdt:P17 wd:Q794; wdt:P625 ?coordinates. ?person p:P569/psv:P569 ?birth_date_node. ?birth_date_node wikibase:timeValue ?birth_dateyear. BIND( YEAR(?birth_dateyear) AS ?birth_year) BIND( YEAR(?birth_dateyear) AS ?birth_year) BIND( wd:Q6581072 AS ?sex_or_gender) FILTER(?birth_year > 1900). # Define label because of Group SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fa". ?occupation rdfs:label ?occupationLabel. ?person rdfs:label ?personLabel. ?birthplace rdfs:label ?birthplaceLabel. ?sex_or_gender rdfs:label ?sex_or_genderLabel.} } GROUP BY ?person ?personLabel ?birthplaceLabel ?birth_year ?sex_or_genderLabel ?coordinates ?occupations

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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Iranian female born in a city with a birth date > 1900
SELECT DISTINCT ?person ?personLabel ?birthplaceLabel ?birth_year ?sex_or_genderLabel ?coordinates
(GROUP_CONCAT(DISTINCT ?occupationLabel; SEPARATOR=", ") AS ?occupations)

WHERE {
  ?person wdt:P31 wd:Q5;
          wdt:P19 ?birthplace;
          wdt:P21 wd:Q6581072;
          wdt:P106 ?occupation.
  ?birthplace wdt:P31/wdt:P279* wd:Q515;
              wdt:P17 wd:Q794;
              wdt:P625 ?coordinates.
  ?person p:P569/psv:P569 ?birth_date_node. 
  ?birth_date_node wikibase:timeValue ?birth_dateyear.
  BIND( YEAR(?birth_dateyear)  AS ?birth_year)
  BIND( YEAR(?birth_dateyear)  AS ?birth_year)
  BIND( wd:Q6581072  AS ?sex_or_gender)
  FILTER(?birth_year > 1900).
  # Define label because of Group
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fa".
                           ?occupation rdfs:label ?occupationLabel.
                           ?person rdfs:label ?personLabel.
                           ?birthplace rdfs:label ?birthplaceLabel.
                           ?sex_or_gender rdfs:label ?sex_or_genderLabel.}
} GROUP BY ?person ?personLabel ?birthplaceLabel ?birth_year ?sex_or_genderLabel ?coordinates ?occupations

Query found at