{"id":"train_0","question":"Which items have an official website containing 'itch.io', and what are their labels and official website URLs?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?linked_from ?linked_fromLabel ?p856 { ?linked_from wdt:P856 ?p856 . FILTER ( CONTAINS ( STR ( ?p856 ) , 'itch.io' ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?linked_fromLabel","paraphrases":[],"info":{"id":"dev_3","title":"Items that links to specific websites","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/11"}}
{"id":"train_1","question":"Which items have more than one unit for the \"longest observed lifespan\" property, and how many units do they have?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX p: <http://www.wikidata.org/prop/> SELECT ?item ( COUNT ( ?unit ) AS ?number_of_units ) { ?item p:P4214 [ psv:P4214 [ wikibase:quantityUnit ?unit ] ] . } GROUP BY ?item HAVING ( ?number_of_units > 1 )","paraphrases":[],"info":{"id":"dev_4","title":"Strange quantityUnit in `longest observed lifespan (P4214)` property for 11 objects","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/12"}}
{"id":"train_2","question":"Which items have an official website URL that contains 'bbc.com', and what are their labels?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?item ?itemLabel ?website WHERE { ?item wdt:P856 ?website . FILTER CONTAINS ( LCASE ( STR ( ?website ) ) , 'bbc.com' ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" } }","paraphrases":[],"info":{"id":"dev_5","title":"Item from website URL","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/07"}}
{"id":"train_3","question":"What are the names, birth dates, archive institutions (if available), archive descriptions (if available), inventory numbers (if available), film titles, and award titles of film directors born between 1921 and 1929 who have directed films that received Cannes Film Festival Awards? Please order the results by the archive institution names in descending order.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel ?naissance ?archives ?archivesLabel ?archivesDescription ?inventaire ?filmLabel ?recompenseLabel { ?item wdt:P106 wd:Q2526255 ; wdt:P569 ?naissance . OPTIONAL { ?item p:P485 ?statement . ?statement ps:P485 ?archives . OPTIONAL { ?statement pq:P217 ?inventaire . } } FILTER ( year ( ?naissance ) > 1920 ) . FILTER ( year ( ?naissance ) < 1930 ) . ?film wdt:P166 ?recompense . ?film wdt:P57 ?item . ?recompense wdt:P31 wd:Q28444913 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en,de,it\" . } } ORDER BY DESC ( ?archivesLabel )","paraphrases":[],"info":{"id":"dev_6","title":"Qualifier","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/03"}}
{"id":"train_4","question":"Who are the siblings of Jane Austen, excluding George Austen and Cassandra Austen, along with their labels?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?include ?includeLabel WHERE { wd:Q36322 wdt:P3373 ?include . FILTER NOT EXISTS { wd:Q36322 wdt:P3373 ?include . VALUES ?include { wd:Q3101398 wd:Q2505245 } } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_8","title":"Can't figure out how to exclude statements","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/06"}}
{"id":"train_5","question":"Who are the pairs of individuals born in Italy with the same family name, born in the same place within a 10-year interval, married to each other, and both without any siblings?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item1 ?item1Label ?birthdate1 ?item2 ?item2Label ?birthdate2 ?birthplaceLabel { ?item1 wdt:P19 ?birthplace ; wdt:P734 ?fn . ?birthplace wdt:P17 wd:Q38 . ?item2 wdt:P19 ?birthplace ; wdt:P734 ?fn . hint:Prior hint:rangeSafe true . FILTER ( str ( ?item1 ) < STR ( ?item2 ) ) ?item1 wdt:P569 ?birthdate1 . ?item2 wdt:P569 ?birthdate2 . FILTER ( ABS ( YEAR ( ?birthdate1 ) - YEAR ( ?birthdate2 ) ) < 10 ) ?item1 wdt:P26 ?item2 . FILTER NOT EXISTS { ?item1 wdt:P3373 [] } FILTER NOT EXISTS { ?item2 wdt:P3373 [] } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?item1Label ?birthdate1","paraphrases":[],"info":{"id":"dev_9","title":"Brothers without property","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/06"}}
{"id":"train_6","question":"How many crew members were aboard the space shuttle mission STS-102 only for takeoff?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ( COUNT ( ?up ) AS ?up_only ) WHERE { values ?item { wd:Q384250 } . optional { ?item p:P1029 ?tom . optional { ?tom pq:P518 ?applies . } } BIND ( IF ( ?applies = wd:Q854248 , 1 , 1 / 0 ) AS ?up ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } GROUP BY ?item ?itemLabel","paraphrases":[],"info":{"id":"dev_10","title":"Conditional sum fail","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/06"}}
{"id":"train_7","question":"What are the items with a United States Statutes at Large citation and a United States Public Law number containing '116-', along with their optional point in time, short name, signatory, and the point in time of the signatory (all optional)?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> SELECT ?item ?pl ?signatory ?date2 ?short ?itemLabel WHERE { ?item wdt:P3825 ?stat ; wdt:P3837 ?pl . OPTIONAL { ?item wdt:P585 ?date . } OPTIONAL { ?item wdt:P1813 ?short . } OPTIONAL { ?item p:P1891 ?stat2 . ?stat2 ps:P1891 ?signatory ; . OPTIONAL { ?stat2 pq:P585 ?date2 . } } OPTIONAL { } FILTER ( CONTAINS ( ?pl , '116-' ) ) . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,en\" } }","paraphrases":[],"info":{"id":"dev_11","title":"Getting the point-in-time of a property?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/12"}}
{"id":"train_8","question":"How many Italian external IDs do mathematicians in the website Mathematica Italiana have, grouped by the number of such IDs? In other words, how many mathematicians have 1 external ID, how many have 2, and so on.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> Select ?ID_count ( count ( ?item ) as ?item_count ) where { SELECT ?item ( count ( ?id ) as ?ID_count ) WHERE { ?item wdt:P9114 ?P9114id . OPTIONAL { ?item ?prop ?id . ?propItem wikibase:directClaim ?prop . ?propItem wikibase:propertyType wikibase:ExternalId . ?propItem wdt:P17 wd:Q38 . } } group by ?item } group by ?ID_count order by desc ( ?ID_count )","paraphrases":[],"info":{"id":"dev_12","title":"Count only certain identifiers","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/06"}}
{"id":"train_9","question":"Who are the doctoral advisors of Leonhard Euler, and their advisors, and so on? In addition, who are his doctoral student, grand-student, great-grand-student, and great-great-grand-students? Each tuple in the result should contain both the student and their doctoral advisor.","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?doctor ?doctorMaster WHERE { { ?root ( wdt:P184 * ) ?doctor . } union { ?root wdt:P185 / wdt:P185 ? / wdt:P185 ? / wdt:P185 ? ?doctor . } ?doctor wdt:P184 ?doctorMaster . VALUES ?root { wd:Q7604 } }","paraphrases":[],"info":{"id":"dev_15","title":"Doctoral advisor","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/04"}}
{"id":"train_10","question":"What are the administrative territorial entities within the district of Offenbach and their respective twin towns or sister cities, along with their labels?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?twin ?twinLabel WHERE { wd:Q7912 wdt:P150 * ?item . ?item wdt:P190 ?twin . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_16","title":"List of all partnerships in the district of Offenbach","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/02"}}
{"id":"train_11","question":"Who are the pianists born in Morocco and died in Paris?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?PersonA ?PersonALabel WHERE { ?PersonA wdt:P106 wd:Q486748 . ?PersonA wdt:P19 / wdt:P17 ? wd:Q1028 . hint:Prior hint:gearing \"forward\" . ?PersonA wdt:P20 wd:Q90 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_18","title":"Pianists born in Morocco who died in Paris","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_12","question":"What are the items that are both a volume and a scientific journal?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel WHERE { ?item p:P31 [ ps:P31 wd:Q1238720 ] . ?item p:P31 [ ps:P31 wd:Q5633421 ] . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE]\" . } }","paraphrases":[],"info":{"id":"dev_21","title":"Items that are \"instance of\" two things at the same time","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/10"}}
{"id":"train_13","question":"What are the distinct border checkpoints, their labels, and their coordinates (if available) for Cyprus?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?itemLabel ?coord WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } VALUES ?borders { wd:Q15974882 } ?item wdt:P361 * / wdt:P31 / wdt:P279 * wd:Q757292 . ?item wdt:P361 * / wdt:P31 * / wdt:P279 * ?borders . OPTIONAL { ?item wdt:P625 ?coord . } }","paraphrases":[],"info":{"id":"dev_22","title":"Equivalent of IN in a query","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_14","question":"Who were the politicians born on June 14, 1946? Include also their family names, given names, and dates of birth.","sparql":"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?human ?humanLabel ?lastName ?givenNames ?dob WHERE { ?human wdt:P106 wd:Q82955 . ?human p:P735 / ps:P735 ?givenNames . ?human wdt:P734 ?lastName . ?human wdt:P569 ?dob . hint:Prior hint:rangeSafe true . FILTER ( ?dob >= xsd:dateTime ( \"1946-06-14T00:00:00Z\" ) && ?dob < xsd:dateTime ( \"1946-06-15T00:00:00Z\" ) ) . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } }","paraphrases":[],"info":{"id":"dev_24","title":"All given names for a person.","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/05"}}
{"id":"train_15","question":"What are the items that are associated with both Zambia and Angola as their countries, and do not have any other country associations?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel WHERE { ?item wdt:P17 wd:Q953 . ?item wdt:P17 wd:Q916 . FILTER NOT EXISTS { ?item wdt:P17 ?P17 . FILTER ( ?P17 NOT IN ( wd:Q916 , wd:Q953 ) ) } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE]\" . } }","paraphrases":[],"info":{"id":"dev_30","title":"I need a help search `country (P17)` with specific countries","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/10"}}
{"id":"train_16","question":"Which items have a Roman praenomen, have identical English and Catalan labels, and do not have a Latin label? Include the item, Roman praenomen, and the English label in the results.","sparql":"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?item ?roman_praenomen ?enlabel WHERE { ?item wdt:P2358 ?roman_praenomen . ?item rdfs:label ?enlabel . FILTER ( LANG ( ?enlabel ) = 'en' ) . ?item rdfs:label ?calabel . FILTER ( LANG ( ?calabel ) = 'ca' ) . FILTER ( STR ( ?enlabel ) = STR ( ?calabel ) ) . OPTIONAL { ?item rdfs:label ?lalabel . FILTER ( LANG ( ?lalabel ) = 'la' ) . } FILTER ( ! BOUND ( ?lalabel ) ) . }","paraphrases":[],"info":{"id":"dev_31","title":"Catalan label and Roman people","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/03"}}
{"id":"train_17","question":"Who are the people that have a specific relationship with Marilyn Monroe (Marilyn Monroe is the object), and what is the nature of their relationship? Consider these relationships: child, place of death, unmarried partner, sibling, and spouse.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?PersonLabel ?relationshipLabel WHERE { ?Person ?predicate wd:Q4616 . ?relationship wikibase:directClaim ?predicate . VALUES ?relationship { wd:P40 wd:P20 wd:P451 wd:P3373 wd:P26 } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } }","paraphrases":[],"info":{"id":"dev_34","title":"Type of Relationships","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/08"}}
{"id":"train_18","question":"Are Microsoft Windows, macOS, iOS, and Android classified as \"MobileOS\" or \"DesktopOS\"? Retrun whether each one is a MobileOS or DesktopOS","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?product ?productLabel ?productType WHERE { VALUES ?product { wd:Q1406 wd:Q14116 wd:Q48493 wd:Q94 } . BIND ( IF ( EXISTS { ?product wdt:P31 wd:Q920890 } , \"MobileOS\" , \"DesktopOS\" ) AS ?productType ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_35","title":"Using a triple as an IF condition","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_19","question":"Which genera have taxon names consisting of exactly two letters and what are their taxon names?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?taxon_name WHERE { ?item wdt:P31 wd:Q16521 . ?item wdt:P105 wd:Q34740 . ?item wdt:P225 ?taxon_name . FILTER ( STRLEN ( ?taxon_name ) = 2 ) }","paraphrases":[],"info":{"id":"dev_37","title":"Two-letter genera, on Wikispecies","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/07"}}
{"id":"train_20","question":"For each european knot tyers meeting, give the session number and the start and end dates for each event. In addition, also include the city and specific location (e.g. mesumes, etc.) where it took place (city and specific location only if available).","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?session ?item ?city ?site ?start ?end WHERE { ?item wdt:P393 ?session . ?item wdt:P31 wd:Q112064134 . ?item wdt:P276 ?site . OPTIONAL { ?site wdt:P276 * / wdt:P131 * ?city . ?city wdt:P31 / wdt:P279 * wd:Q486972 . } ?item wdt:P580 ?start . ?item wdt:P582 ?end . }","paraphrases":[],"info":{"id":"dev_38","title":"How to retrieve the city of a building with sparql?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/09"}}
{"id":"train_21","question":"Who are the Zambian citizens who are screenwriters, film directors, or actors, and what are their exact occupations?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item WHERE { VALUES ?occ { wd:Q28389 wd:Q2526255 wd:Q33999 } ?item wdt:P106 / wdt:P279 * ?occ . ?item wdt:P106 ?occupation . ?occupation wdt:P279 * ?occ . ?item wdt:P27 wd:Q953 . }","paraphrases":[],"info":{"id":"dev_39","title":"African Cinema Content Lacking Wikipedia Pages in Wen","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2024/04"}}
{"id":"train_22","question":"What are the primary topics of the articles written in \"Deutschlands merkwürdige Bäume\", and what are their coordinates?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?mainSubjLabel ?coordinates WHERE { wd:Q19172509 wdt:P527 ?Baeume . ?Baeume wdt:P921 ?mainSubj . ?mainSubj wdt:P625 ?coordinates . }","paraphrases":[],"info":{"id":"dev_40","title":"Modify the displayed Sitelink in the Infolayers on map view","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/03"}}
{"id":"train_23","question":"Which organizations have the ticker symbol \"FB\", and on which stock exchanges are they listed? Include the organizations, ticker simples, and stock exchanges in the response.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> SELECT ?Org ?OrgLabel ?StockExchange ?StockExchangeLabel ?Ticker WHERE { ?Org p:P414 ?SE . ?SE ps:P414 ?StockExchange . ?SE pq:P249 ?Ticker . FILTER ( ?Ticker = \"FB\" ) . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } }","paraphrases":[],"info":{"id":"dev_41","title":"Find a public company","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2016/08"}}
{"id":"train_24","question":"What are the names, GND IDs, birth locations, and coordinates of the birth locations for authors who have the GND ID \"118561359\", with labels provided in German if available?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?author ?authorLabel ?GND ?birthLocation ?coordinates WHERE { VALUES ?GND { \"118561359\" } ?author wdt:P227 ?GND ; wdt:P19 ?birthLocation . ?birthLocation wdt:P625 ?coordinates . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_Language],de\" . } }","paraphrases":[],"info":{"id":"dev_43","title":"Query via ID, Retrieving GeoData","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/01"}}
{"id":"train_25","question":"What events took place in Tokyo in 2002, including their labels and specific dates?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?when WHERE { ?item wdt:P31 / wdt:P279 * wd:Q1656682 . ?item wdt:P131 wd:Q1490 . ?item wdt:P585 ?when . BIND ( year ( ?when ) as ?when2 ) filter ( ?when2 = 2002 ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE]\" . } }","paraphrases":[],"info":{"id":"dev_44","title":"2002 events in Tokyo","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/01"}}
{"id":"train_26","question":"What is the count of writers born in Castile and León, grouped by their gender labels?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?genderLabel ( count ( ?gender ) as ?count ) WHERE { ?item wdt:P106 wd:Q36180 . ?item wdt:P19 / wdt:P131 * wd:Q5739 . ?item wdt:P21 ?gender . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } } group by ?genderLabel","paraphrases":[],"info":{"id":"dev_45","title":"All female vs male writters born in a territorial entity including all the sub-territorial entities","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/11"}}
{"id":"train_27","question":"What are the names and dates of birth of the 10 youngest and 10 oldest goal scorers in the UEFA Super Cup? In addition, include when the specific goal in consideration took place, and how old was the player (in days) when that goal took place.","sparql":"SELECT ?player ?playerLabel ?dob ?goal_date ?goal_age_days\nWITH\n{\n  SELECT ?player ?dob ?date_first ?date_latest ?age_first ?age_latest\n  WHERE\n  {\n    ?player p:P6509 ?p6509stm . # goals\n    ?p6509stm pq:P7124 ?date_first .\n    ?p6509stm pq:P7125 ?date_latest .\n    ?p6509stm pq:P642 wd:Q484028 . # for UEFA Super Cup\n    ?player wdt:P569 ?dob . # Date of birth\n    BIND(?date_first - ?dob AS ?age_first)\n    BIND(?date_latest - ?dob AS ?age_latest)\n  }\n} as %query\nWHERE\n{\n  {\n    SELECT ?player ?dob (?date_first AS ?goal_date) (?age_first AS ?goal_age_days)\n    {\n      INCLUDE %query\n    }\n    ORDER BY ASC(?goal_age_days)\n    LIMIT 10\n  }\n  UNION\n  {\n    SELECT ?player ?dob (?date_latest AS ?goal_date) (?age_latest AS ?goal_age_days)\n    {\n      INCLUDE %query\n    }\n    ORDER BY DESC(?goal_age_days)\n    LIMIT 10\n  }\n  SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n}\nORDER BY ASC(?goal_age_days)","paraphrases":[],"info":{"id":"dev_47","title":"Top 10 of the youngest and the oldest goal scorers and players in tournament history","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/03"}}
{"id":"train_28","question":"What are the distinct trademarks that contain \"mercedes\" in its English name, are owned by an organization, and have a logo image? Please provide their labels in English, the logo images, and the names of the owning organizations.","sparql":"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?trademark ?trademarkLabel ?image ?organization WHERE { ?trademark wdt:P31 / wdt:P279 * wd:Q167270 ; rdfs:label ?trademarkLabel . FILTER ( LANG ( ?trademarkLabel ) = 'en' ) . FILTER ( CONTAINS ( LCASE ( ?trademarkLabel ) , 'mercedes' ) ) . ?trademark wdt:P127 ?organization . ?organization wdt:P31 / wdt:P279 * wd:Q43229 . ?trademark wdt:P154 ?image . }","paraphrases":[],"info":{"id":"dev_48","title":"Bug in usage of REGEX","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/08"}}
{"id":"train_29","question":"What is the average number of passengers and the deviation from the average number of passengers for each year after 1985 at the \"JNB\" airport? Return the average number, the deviation, and the year for each tuple.","sparql":"SELECT ?item ?itemLabel (avg(?number) as ?passenger) (max(avg(?number) - ?number) as ?plus_minus) ?year \nwith {\n  select ?item ?statement ?year ?timevalue ?numberperperiod{\n    ?item wdt:P238 ?IATA\n    VALUES ?IATA {\"JNB\"}.\n    ?item p:P3872 ?statement.\n    ?statement pqv:P585 ?timevalue \n               ; ps:P3872 ?numberperperiod\n               .\n    ?timevalue wikibase:timeValue ?date .\n               \n    MINUS { ?statement wikibase:rank wikibase:DeprecatedRank }\n    bind (YEAR(?date) AS ?year) \n    FILTER (?year >1985) .\n  }\n} as %airport\n \nwhere {\n  {\n    select ?item ?year (sum(?numberperperiod) as ?number) {\n      include %airport .\n      ?timevalue wikibase:timePrecision ?prec filter ( ?prec > 9 )\n    } group by ?item ?year\n  } union {\n      ?timevalue wikibase:timePrecision 9 .\n    bind (?numberperperiod as ?number)\n      include %airport\n  } .\n  SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n} group by ?item ?itemLabel ?year \n  order by ?item desc (?year)\n","paraphrases":[],"info":{"id":"dev_49","title":"A possible (elaborated) solution, using the initial model","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/04"}}
{"id":"train_30","question":"Which schools in the Philippines are named after humans, and who are they named after?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel ?namedAfter ?namedAfterLabel WHERE { ?item wdt:P31 / wdt:P279 * wd:Q2385804 . ?item wdt:P17 wd:Q928 . ?item wdt:P138 ?namedAfter . ?namedAfter wdt:P31 wd:Q5 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_51","title":"Current US legislators sorted by age and schools in the Philippines named after persons","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/02"}}
{"id":"train_31","question":"How many distinct African female citizens described in the Dictionary of African Biography have a Wikipedia article in any language?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX schema: <http://schema.org/> PREFIX wd: <http://www.wikidata.org/entity/> select ( count ( distinct ?person ) as ?count ) where { ?person wdt:P31 wd:Q5 . ?person wdt:P21 wd:Q6581072 . ?person wdt:P27 / wdt:P30 wd:Q15 . ?article schema:about ?person ; schema:isPartOf ?domain . filter ( contains ( str ( ?domain ) , \"wikipedia\" ) ) ?person wdt:P1343 wd:Q46002746 . }","paraphrases":[],"info":{"id":"dev_55","title":"African women queries","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/09"}}
{"id":"train_32","question":"Who are the female Swiss citizens who are politicians and are also either diplomats, employed by the United Nations, or employed by an international organization?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item WHERE { ?item wdt:P106 wd:Q82955 . { ?item wdt:P106 wd:Q193391 . } UNION { ?item wdt:P108 / wdt:P361 * wd:Q1065 . } UNION { ?item wdt:P108 / wdt:P31 wd:Q484652 . } ?item wdt:P21 wd:Q6581072 . ?item wdt:P27 wd:Q39 . }","paraphrases":[],"info":{"id":"dev_57","title":"Swiss women politicians involved in foreign affairs and/or international policy","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/08"}}
{"id":"train_33","question":"What are the railway stations located in São Paulo?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q55488 . ?item p:P131 ?statement . ?statement ps:P131 wd:Q174 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en,pt \" . } }","paraphrases":[],"info":{"id":"dev_60","title":"show source","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/11"}}
{"id":"train_34","question":"What are the earliest and latest years in which works authored by Albert Einstein were published?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> select ( min ( year ( ?date ) ) as ?min_year ) ( max ( year ( ?date ) ) as ?max_year ) { values ?author { wd:Q937 } ?author ^ wdt:P50 / wdt:P577 ?date . }","paraphrases":[],"info":{"id":"dev_61","title":"Flourished dates","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/10"}}
{"id":"train_35","question":"Who are the distinct individuals who held the position of Massachusetts state senator, excluding those who served in the 1929-1930 Massachusetts legislature? Also, provide the count of their sitelinks if available.","sparql":"SELECT distinct ?item ?linkcount with { select ?item where\n{\n  ?position wdt:P279* wd:Q20058776 . hint:Prior hint:gearing \"forward\".   \n  ?item p:P39 [ps:P39 ?position \n                      ; pq:P2937 ?leg\n                      ; wikibase:rank ?rank\n              ] .           # position held: Massachusetts state senator\n  filter ( ?leg not in (wd:Q96050576)) .\n  filter (?rank != wikibase:DeprecatedRank)\n   \n} } as %i\nwhere\n{\n  include %i\n  ?item wdt:P793 wd:Q96050576 .                      # significant event: 1929 legislature\n  ?item wdt:P31 wd:Q5 .                            # human\n  OPTIONAL {?item wikibase:sitelinks ?linkcount .} # count of sitelinks  \n} \n","paraphrases":[],"info":{"id":"dev_62","title":"specify senators who served in a particular legislative term?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/03"}}
{"id":"train_36","question":"How many people, grouped by their country of citizenship, have a Tabakalera ID and are part of the Arteleku collection?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ( COUNT ( ?ser_humano ) AS ?count ) ?paisLabel WHERE { ?ser_humano wdt:P31 wd:Q5 . ?ser_humano wdt:P27 ?pais . ?ser_humano p:P10069 ?statement . ?statement ps:P10069 ?Tabakalera_ID . ?statement pq:P195 wd:Q61070552 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } GROUP BY ?paisLabel","paraphrases":[],"info":{"id":"dev_64","title":"Filtering by Identifier's qualifiers","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/02"}}
{"id":"train_37","question":"What are the names, dates of birth (if available), and dates of death (if available) of female employees or former employees of the Bank of England?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?date_of_birth ?date_of_death WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } OPTIONAL { } ?item wdt:P31 wd:Q5 ; wdt:P21 wd:Q6581072 . OPTIONAL { ?item wdt:P569 ?date_of_birth . } OPTIONAL { ?item wdt:P570 ?date_of_death . } ?item wdt:P108 wd:Q183231 . } LIMIT 1000","paraphrases":[],"info":{"id":"dev_67","title":"list all female employees  and those who have positions at the Bank of England","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/12"}}
{"id":"train_38","question":"What are the cities in Boulder County, Colorado, and what are their latest population, when and how was that population determined?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?population ?population_date ?population_methodLabel WHERE { ?item p:P31 / ps:P31 / wdt:P279 * wd:Q1093829 . ?county wdt:P131 wd:Q1261 . ?item wdt:P131 wd:Q113029 . ?item wdt:P131 ?county . ?county wdt:P131 ?state . OPTIONAL { ?item p:P1082 ?population_statement . ?population_statement ps:P1082 ?population . ?population_statement pq:P585 ?population_date . ?population_statement pq:P459 ?population_method . } FILTER NOT EXISTS { ?item p:P1082 / pq:P585 ?population_date_2 . FILTER ( ?population_date_2 > ?population_date ) } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } }","paraphrases":[],"info":{"id":"dev_69","title":"Select first item in a list of attributes","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/10"}}
{"id":"train_39","question":"Which airport has the ICAO airport code \"RJAA\" and what place does it serve, along with their respective labels in English?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?airport ?airportLabel ?airportIn ?airportInLabel WHERE { ?airport wdt:P239 \"RJAA\" . { ?airport wdt:P931 ?airportIn . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } }","paraphrases":[],"info":{"id":"dev_71","title":"Query to Obtain City of the Airport [SOLVED]","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/11"}}
{"id":"train_40","question":"What are the details of female individuals who have an Anime News Network person ID and work as a director, television director, anime director, or film director? Please include their names, all their occupations, date of birth (if available), and date of death (if available).","sparql":"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?dateofbirth ?dateofdeath WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P21 wd:Q6581072 . ?item wdt:P1982 ?ANNid . { ?item wdt:P106 wd:Q3455803 } UNION { ?item wdt:P106 wd:Q2059704 } UNION { ?item wdt:P106 wd:Q11284414 } UNION { ?item wdt:P106 wd:Q2526255 } ?item wdt:P106 ?occupation OPTIONAL { ?item wdt:P569 ?dateofbirth . } OPTIONAL { ?item wdt:P570 ?dateofdeath . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,ja\" . ?occupation rdfs:label ?occupationLabel . ?item rdfs:label ?itemLabel . } } group by ?item ?itemLabel ?dateofbirth ?dateofdeath ?ANNid","paraphrases":[],"info":{"id":"dev_78","title":"Avoiding duplicates","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/08"}}
{"id":"train_41","question":"What are the distinct airports located in either Abkhazia (a Russian administrative division in Georgia) or the Republic of Abkhazia (a state with limited recognition in the Caucasus) that are considered to be aerodromes in Wikidata? Please provide their labels, and if available, their coordinates, ICAO airport codes, and IATA airport codes.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?airport ?airportLabel ( SAMPLE ( ?coord ) AS ?coord ) ?ICAO ?IATA WHERE { VALUES ?country { wd:Q23334 wd:Q31354462 } ?airport ( wdt:P31 / wdt:P279 * ) wd:Q62447 . ?airport wdt:P17 ?country . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,fr,[AUTO_LANGUAGE]\" . } OPTIONAL { ?airport wdt:P625 ?coord . } OPTIONAL { ?airport wdt:P239 ?ICAO . } OPTIONAL { ?airport wdt:P238 ?IATA . } } GROUP BY ?airport ?airportLabel ?ICAO ?IATA","paraphrases":[],"info":{"id":"dev_79","title":"Query not showing the good elements","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/11"}}
{"id":"train_42","question":"Which individuals have the same Transfermarkt ID for both player and manager roles and what are their IDs?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?item ?id WHERE { ?item wdt:P2446 ?id ; wdt:P2447 ?id }","paraphrases":[],"info":{"id":"dev_80","title":"Identical external IDs","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/09"}}
{"id":"train_43","question":"Who are the individuals with Estonian citizenship who were born and died between January 1, 1941, and January 1, 1991?","sparql":"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item WHERE { ?item wdt:P27 wd:Q191 . ?item p:P569 / psv:P569 ?node_born . ?item p:P570 / psv:P570 ?node_dead . ?node_born wikibase:timeValue ?born . ?node_born wikibase:timePrecision ?precision_born . ?node_dead wikibase:timeValue ?dead . ?node_dead wikibase:timePrecision ?precision_dead . FILTER ( ?born >= \"1941-01-01T00:00:00Z\" ^^ xsd:dateTime ) FILTER ( ?born < \"1991-01-01T00:00:00Z\" ^^ xsd:dateTime ) FILTER ( ?dead >= \"1941-01-01T00:00:00Z\" ^^ xsd:dateTime ) FILTER ( ?dead < \"1991-01-01T00:00:00Z\" ^^ xsd:dateTime ) }","paraphrases":[],"info":{"id":"dev_81","title":"Wrong query","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/11"}}
{"id":"train_44","question":"Which items have an Elo rating, along with the Elo rating value and two different points in time associated with that rating, where the first point in time is earlier than the second point in time?","sparql":"PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> SELECT ?item ?elo ?pit1 ?pit2 WHERE { ?item p:P1087 [ ps:P1087 ?elo ; pq:P585 ?pit1 ; pq:P585 ?pit2 ] . FILTER ( ?pit1 < ?pit2 ) . }","paraphrases":[],"info":{"id":"dev_82","title":"Elo ratings with two `point in time (P585)`","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/08"}}
{"id":"train_45","question":"How many individuals are there who have a Munzinger person ID but do not have a GND ID?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ( COUNT ( ?item ) AS ?count ) { ?item wdt:P31 wd:Q5 . ?item wdt:P1284 [] . MINUS { ?item wdt:P227 [] . } }","paraphrases":[],"info":{"id":"dev_83","title":"Munzinger person ID but GND missing","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/06"}}
{"id":"train_46","question":"What are the movies in which both Brad Pitt and Leonardo DiCaprio appear together?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?movie ?movieLabel { ?movie wdt:P31 / wdt:P279 * wd:Q11424 . ?movie wdt:P161 wd:Q35332 . ?movie wdt:P161 wd:Q38111 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_85","title":"List of Common movies between 2 actors","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/05"}}
{"id":"train_47","question":"What are the dams located in Cyprus?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel WHERE { ?item wdt:P17 wd:Q229 . ?item wdt:P31 / wdt:P279 * wd:Q12323 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_86","title":"Dams","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/01"}}
{"id":"train_48","question":"How many people were awarded the title of International Master by a chess federation in the year 1995?","sparql":"PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ( COUNT ( * ) AS ?cnt ) WHERE { ?item p:P2962 [ ps:P2962 wd:Q752119 ; pq:P580 ?start ] . FILTER ( YEAR ( ?start ) = 1995 ) . }","paraphrases":[],"info":{"id":"dev_92","title":"Number of International Masters awarded per year","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/06"}}
{"id":"train_49","question":"What are the distinct municipalities in Quebec that are either local municipalities of Quebec or unorganized areas of Canada? These municipalities should be located within Quebec, should not have a Banque de noms de lieux du Québec ID, and should not have been dissolved, abolished, demolished, or has ended. ","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?municip ?municipLabel ?statutLabel ?mrcLabel ?regionLabel WHERE { ?municip p:P31 ?statement . { ?statement ps:P31 / wdt:P279 * wd:Q3327873 } union { ?statement ps:P31 wd:Q3518810 } FILTER NOT EXISTS { ?statement pq:P582 ?pqfin . } ?municip wdt:P31 ?statut . ?municip wdt:P131 ?mrc . ?mrc wdt:P131 ?region . ?region wdt:P131 wd:Q176 . Optional { ?municip wdt:P2100 ?ctq . } FILTER NOT EXISTS { ?municip wdt:P2100 ?x } FILTER NOT EXISTS { ?municip wdt:P576 ?dissolu } FILTER NOT EXISTS { ?municip wdt:P582 ?end } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" , \"fr\" . } } ORDER BY ?regionLabel ?mrcLabel ?municipLabel LIMIT 1000","paraphrases":[],"info":{"id":"dev_98","title":"Qualifier in FILTER NOT EXISTS","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/09"}}
{"id":"train_50","question":"Which disasters, classified as hazards causing significant physical damage, destruction, or death, began on a Friday the 13th? Please provide their start times as well.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?disaster ?disasterLabel ?start_time WHERE { ?disaster wdt:P31 / wdt:P279 * wd:Q3839081 ; wdt:P580 ?start_time . BIND ( DAY ( ?start_time ) AS ?q ) . FILTER ( ?q = 13 ) . BIND ( MONTH ( ?start_time ) + IF ( MONTH ( ?start_time ) < 3 , 12 , 0 ) AS ?m ) . BIND ( YEAR ( ?start_time ) - IF ( MONTH ( ?start_time ) < 3 , 1 , 0 ) AS ?_year ) . BIND ( ?_year - FLOOR ( ?_year / 100 ) * 100 AS ?K ) . BIND ( FLOOR ( YEAR ( ?start_time ) / 100 ) AS ?J ) . BIND ( ?q + FLOOR ( 13 * ( ?m + 1 ) / 5 ) + ?K + FLOOR ( ?K / 4 ) + FLOOR ( ?J / 4 ) - 2 * ?J AS ?_h ) . FILTER ( ?_h - FLOOR ( ?_h / 7 ) * 7 = 6 ) . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" } . }","paraphrases":[],"info":{"id":"dev_99","title":"Disasters starting on Friday 13","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/12"}}
{"id":"train_51","question":"The number of members in the British House of Commons (House of Commons (Q11005)) varies as members may resign or die and vacancies are filled by by-elections. Find the smallest, largest number of members in the year 2021 and the average number of members for the whole year.","sparql":"SELECT (sum(?count) / 365 as ?count2) (min(?count) as ?mincount) (max(?count) as ?maxcount)\nWITH {\n  SELECT ?item ?date WHERE {\n  ?item wdt:P31 wd:Q47150325. \n  ?item wdt:P585 ?date . hint:Prior hint:rangeSafe true.\n  filter(\"2021-01-01\"^^xsd:dateTime <= ?date && ?date < \"2022-01-01\"^^xsd:dateTime )\n} } as %dates\nWITH {\n  SELECT ?date (count(?MP) as ?count) WHERE { \n  INCLUDE %dates\n  ?MP p:P39 ?stat . \n  ?stat ps:P39 wd:Q77685926.\n  filter not exists {?stat pq:P580 ?start . filter(?start > ?date ) }        \n  filter not exists {?stat pq:P582 ?end . filter(?end < ?date ) }\n  filter not exists {\n    ?stat pq:P582 ?endt .   \n    ?MP p:P39 ?stat2 . \n    ?stat2 ps:P39 wd:Q77685926.\n    ?stat2 pq:P580 ?endt .\n    filter(str(?stat2) != str(?stat))\n    filter(?endt = ?date)\n    }\n} group by ?date } as %counts\nWHERE\n{\nINCLUDE %counts\n        \n  SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". } \n} order by desc(?date)","paraphrases":[],"info":{"id":"dev_101","title":"Submission from Infrastruktur","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/09"}}
{"id":"train_52","question":"How many distinct items were published between January 1, 1700, and December 31, 1799, in the municipalities of Bilbao, San Sebastián, Tolosa, and Vitoria-Gasteiz?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ( count ( DISTINCT ?item ) as ?count ) WHERE { VALUES ?place { wd:Q8692 wd:Q10313 wd:Q497801 wd:Q14318 } ?item wdt:P291 ?place . ?item wdt:P577 ?publishing_date . FILTER ( ?publishing_date >= \"1700-01-01\" ^^ xsd:dateTime && ?publishing_date <= \"1799-12-31\" ^^ xsd:dateTime ) BIND ( YEAR ( ?publishing_date ) as ?year_ ) }","paraphrases":[],"info":{"id":"dev_105","title":"Get bubble chart based on the number of printed matter published each year","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/08"}}
{"id":"train_53","question":"How many current board members, grouped by their gender, for organizations that are part of the DAX index? Only include the best avaialble gender.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?gender ?genderLabel ( COUNT ( ?board_member ) AS ?count ) { wd:Q155718 wdt:P527 ?item . ?item p:P3320 ?board_member_statement . ?board_member_statement a wikibase:BestRank . ?board_member_statement ps:P3320 ?board_member . FILTER NOT EXISTS { ?board_member_statement pq:P582 [] . } ?board_member wdt:P21 ?gender . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],de,en\" . } } GROUP BY ?gender ?genderLabel","paraphrases":[],"info":{"id":"dev_113","title":"Gender breakdown of organizations (that are \"part of\" bigger organizations)?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/05"}}
{"id":"train_54","question":"Among Pablo Picasso, Salvador Dalí, and NASA, filter those that are humans. Then group by their sex or gender. The response should be a list, containing how many are for which gender.","sparql":"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?genderLabel ( COUNT ( DISTINCT ?person ) AS ?number ) WHERE { VALUES ?person { wd:Q5593 wd:Q23548 wd:Q5577 } ?person wdt:P31 wd:Q5 ; wdt:P21 ?gender . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . ?gender rdfs:label ?genderLabel . } } GROUP BY ?gender ?genderLabel","paraphrases":[],"info":{"id":"dev_117","title":"Find the today's featured article or a range (from the start to today for example)","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/04"}}
{"id":"train_55","question":"What are the details of each tennis tournament edition that is part of the 1990 WTA Tour? Include the year, start time, end time, country, surface played on, location, and prize money, all if available.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?y ?start ?end ?countryLabel ?surfaceLabel ?locationLabel ?prize WHERE { ?item wdt:P31 wd:Q47345468 ; wdt:P361 wd:Q1134303 . OPTIONAL { ?item wdt:P585 ?y0 . BIND ( YEAR ( ?y0 ) as ?y ) } OPTIONAL { ?item wdt:P580 ?start . } OPTIONAL { ?item wdt:P582 ?end . } OPTIONAL { ?item wdt:P17 ?country . } OPTIONAL { ?item wdt:P765 ?surface . } OPTIONAL { ?item wdt:P276 ?location . } OPTIONAL { ?item wdt:P2121 ?prize } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"dev_119","title":"1990 WTA Tour","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/10"}}
{"id":"train_56","question":"What are the galleries, libraries, archives, and museums in Germany, along with types (e.g., are they mesumes, libraries, visitor centers?) and types, excluding those operated by businesses?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?GLAM ?GLAMLabel ?Betreiber ?BetreiberLabel ?ist_ein_e_ ?ist_ein_e_Label WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } ?GLAM ( wdt:P31 / wdt:P279 * ) wd:Q1030034 . ?GLAM wdt:P137 ?Betreiber . ?GLAM wdt:P17 wd:Q183 . MINUS { ?Betreiber wdt:P31 wd:Q4830453 . } ?GLAM wdt:P31 ?ist_ein_e_ . }","paraphrases":[],"info":{"id":"afb1c03c10378a56a0682c8d0d8de761db39b8860d46fedb4ee9445932aa4698","title":"GLAMs in Germany that are publicly funded","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/07"}}
{"id":"train_57","question":"How many people are in each district located in the town of Kremmen, Germany year-by-year? In other words, in your response, include the year, district, and the population for each tuple.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ( str ( YEAR ( ?pointInTime ) ) AS ?Jahr ) ?Einwohnerzahl ?OrtsteilLabel ?Ortsteil WHERE { ?Ortsteil wdt:P131 ? wd:Q587094 . ?Ortsteil p:P1082 ?populationStatement . ?populationStatement ps:P1082 ?Einwohnerzahl . ?populationStatement pq:P585 ?pointInTime . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"3c5956b2d846d87e126d95c6c4c8b3551f8b508d002ff489469d12f396c68231","title":"Area chart of populations compared","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/01"}}
{"id":"train_58","question":"What are the emergency phone numbers in each country, along with the main uses of these numbers (if available), ordered by country and phone number? Return for each county, their emergency number and, if available, the main uses of that number","sparql":"PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> SELECT ?country ?number ?use WHERE { ?country p:P2852 ?p2852stm . ?p2852stm ps:P2852 ?number . OPTIONAL { ?p2852stm pq:P366 ?use } } ORDER BY ?countryLabel ?numberLabel","paraphrases":[],"info":{"id":"6a36c62acd2f2e0af354b16a2309718a509da8709b98f4bf8e113ac8c9a68cec","title":"Why some optional \"?use\" values show up but not others?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/04"}}
{"id":"train_59","question":"What are the pairs of siblings who have a male parent with Japanese citizenship, are born less than 300 days apart, and are not twins (i.e., not born on the same day)? Also return for each pair, their birthdays","sparql":"PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?child1 ?child1Label ?birth1 ?child2 ?child2Label ?birth2 WHERE { ?parent wdt:P31 wd:Q5 . ?parent wdt:P21 wd:Q6581097 . ?parent wdt:P40 ?child1 . ?parent wdt:P40 ?child2 . ?parent wdt:P27 wd:Q17 FILTER ( ?child1 != ?child2 ) ?child1 p:P569 ?birth1_statement . ?birth1_statement psv:P569 ?birth1_value . ?birth1_value wikibase:timePrecision 11 . ?birth1_value wikibase:timeValue ?birth1 . ?child2 p:P569 ?birth2_statement . ?birth2_statement psv:P569 ?birth2_value . ?birth2_value wikibase:timePrecision 11 . ?birth2_value wikibase:timeValue ?birth2 . FILTER ( ?birth1 < ?birth2 && ?birth2 - ?birth1 < 300 ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"6be363fa2dd1e49a079354d11bdd7445064e42a3cdbc90c333b5c52197e967af","title":"Siblings with close dates of birth","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_60","question":"Who are people with occupations that are subclasses of \"journalist\" (but excluding those with only \"journalist\" as their occupation), ordered by the item labels, with a limit of 100 results? Return also their occupations","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?occ WHERE { ?item wdt:P106 ?occ . ?occ wdt:P279 * wd:Q1930187 . filter ( ?occ not in ( wd:Q1930187 ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?itemLabel LIMIT 100","paraphrases":[],"info":{"id":"18f0fb3336951b1c21b1a0e520e7cf6c373157f5fa3d759c7205cee96e8d9fc3","title":"obtain label of subclasses of the selection, while excluding the starting class","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/06"}}
{"id":"train_61","question":"What are the publications or printed materials published between January 1, 1700, and December 31, 1799 (both inclusive), in Bilbao, San Sebastián, Tolosa, Vitoria-Gasteiz, Pamplona, or Bayonne? Please provide their labels, coordinates of the place of publication, and publication dates.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?label ?coord ?place ?argitaratze_data WHERE { VALUES ?type { wd:Q732577 wd:Q1261026 } ?item wdt:P31 / wdt:P279 * ?type ; wdt:P577 ?argitaratze_data . FILTER ( ( ?argitaratze_data >= \"1700-01-01\" ^^ xsd:dateTime ) && ( ?argitaratze_data <= \"1799-12-31\" ^^ xsd:dateTime ) ) VALUES ?place { wd:Q8692 wd:Q10313 wd:Q497801 wd:Q14318 wd:Q10282 wd:Q134674 } ?item wdt:P291 ?place . ?place wdt:P625 ?coord . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en,eu\" . } }","paraphrases":[],"info":{"id":"c7b7959708e146b057103e19d9202629d03d4c2a5be3dd44c2ccdaf5b37c7466","title":"Repeated items in the results","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/10"}}
{"id":"train_62","question":"Who have resided in Paris, including their start and end times of residence if available, where the residence period includes or overlaps with the month of September 1977, ordered by the start time?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> select DISTINCT ?entity ?entityLabel ?starttime ?endtime where { ?entity wdt:P31 wd:Q5 . ?entity p:P551 ?statement . ?statement ps:P551 wd:Q90 . OPTIONAL { ?statement pq:P580 ?starttime . } OPTIONAL { ?statement pq:P582 ?endtime . } FILTER ( ( ?starttime <= \"1977-09-01\" ^^ xsd:dateTime && \"1977-10-01\" ^^ xsd:dateTime <= ?endtime ) || ( \"1977-09-01\" ^^ xsd:dateTime <= ?starttime && ?starttime <= \"1977-10-01\" ^^ xsd:dateTime ) || ( \"1977-09-01\" ^^ xsd:dateTime <= ?endtime && ?endtime <= \"1977-10-01\" ^^ xsd:dateTime ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } } GROUP BY ?entity ?entityLabel ?starttime ?endtime ORDER BY ?starttime","paraphrases":[],"info":{"id":"0a81623b9fe960177b7767821ba6bb8fe7caa465457457a8fadfc1d7b55ff949","title":"How to remove duplicate query results (based on the values of the results)?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/11"}}
{"id":"train_63","question":"What are the distinct frigates that have at least two different operators and do not have an official name qualifier associated with each operator? Please provide their labels as well.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q161705 . ?item wdt:P137 ?operator1 . ?item wdt:P137 ?operator2 . filter ( str ( ?operator1 ) != str ( ?operator2 ) ) filter not exists { ?item p:P1448 / pq:P137 ?operator1 . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE]\" . } } order by ?itemLabel","paraphrases":[],"info":{"id":"0a38bef75a557fe292202ee38a349e911fa5e9322417eee438b7146c9f77da22","title":"Ships with multiple operators that do not have multiple official names","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/10"}}
{"id":"train_64","question":"Who are the recipients of the Honda Sports Award and their alma maters (if available)?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?person ?school WHERE { ?person wdt:P166 / wdt:P31 wd:Q5892712 . OPTIONAL { ?person wdt:P69 ?school . ?school wdt:P31 / wdt:P279 * wd:Q38723 . } }","paraphrases":[],"info":{"id":"de08487dabe35552549f055b14427a1115cbbdd7b477f85f8393ea13df51e6ae","title":"Honda Sports Award alma mater","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/07"}}
{"id":"train_65","question":"What are the books or literary works published after January 1, 1980, has an English label, originating from Italy? Include their titles and authors' names in their native language. In addition, for each one, count the number of other entities that have an edge pointing towards it.","sparql":"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?label ?authorlabel ( COUNT ( ?anotherItem ) AS ?inbound_links ) WHERE { VALUES ?type { wd:Q571 wd:Q7725634 } ?item wdt:P31 ?type ; wdt:P577 ?date ; wdt:P50 ?author . ?author wdt:P1559 ?authorlabel . FILTER ( ( LANG ( ?label ) ) = \"en\" ) FILTER ( ?date > \"1979-01-01T00:00:00Z\" ^^ xsd:dateTime ) ?item rdfs:label ?label . FILTER ( ( LANG ( ?label ) ) = \"en\" ) ?item wdt:P495 wd:Q38 . OPTIONAL { ?anotherItem ?predicate ?item . ?property wikibase:directClaim ?predicate . } } GROUP BY ?item ?label ?authorlabel","paraphrases":[],"info":{"id":"b014f46fba6e9a0e8aa2e1822c9a417781cc4549d0ec3dea8b242119a160958c","title":"Number of links of \"what links here\" in Wikipedia for Italian Books 1980-2021","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/03"}}
{"id":"train_66","question":"Which items have a identifier for the Enciclopedia Italiana on Treccani website with an author qualifier, excluding those authored by Goffredo Coppola?","sparql":"PREFIX wd: <http://www.wikidata.org/entity/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> SELECT DISTINCT ?item WHERE { ?item p:P4223 ?ei . ?ei pq:P50 ?author . FILTER ( ?author != wd:Q3772798 ) }","paraphrases":[],"info":{"id":"04ca92e08280053ed80f6050ec92e70074996c315a400b240bc8c6ab8b20d839","title":"Check on multiple qualifiers","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/08"}}
{"id":"train_67","question":"What are the films shot in Georgia, USA, and who are their cast members?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?film ?filmLabel ?castmember ?castmemberLabel WHERE { ?film wdt:P31 wd:Q11424 . ?film wdt:P915 / wdt:P131 * wd:Q1428 . ?film wdt:P161 ?castmember . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" } . }","paraphrases":[],"info":{"id":"ac5fc306788a95286f528077bf1a850a509c1673741400c3bdf42b6854ac488e","title":"Query to identify the [[Property:`cast member (P161)`|actors who were in]] [[`film (Q11424)`|films]] [[Property:`filming location (P915)`|shot in]] [[`Category:Films shot in Georgia (U.S. state) (Q7140743)`|Georgia]].","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/11"}}
{"id":"train_68","question":"Who are the writers that were either born or died in the canton of Vaud? Also return their birthplaces and death places.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?ecrivain ?ecrivainLabel ?lieuNaissance ?lieuMort WHERE { ?ecrivain wdt:P31 wd:Q5 . ?ecrivain wdt:P106 wd:Q36180 . { ?ecrivain wdt:P19 ?lieuNaissance . ?lieuNaissance wdt:P131 wd:Q12771 . } UNION { ?ecrivain wdt:P20 ?lieuMort . ?lieuMort wdt:P131 wd:Q12771 . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],fr\" . } } ORDER BY ?ecrivainLabel","paraphrases":[],"info":{"id":"e2ea23358511dc67b129dde66f03c444e4abf0deab44c5183459004da4e423dd","title":"Remove Duplicate","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/07"}}
{"id":"train_69","question":"What are the taxa within the phylum Echinodermata, including all levels of parent taxa, along with their labels and taxon ranks, ordered by their english label alphabetically and select the top 100?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?rank WHERE { ?item wdt:P171 / wdt:P171 * wd:Q44631 . ?item wdt:P105 ?rank . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by ?itemLabel LIMIT 100","paraphrases":[],"info":{"id":"6741e9c21abbe896cdceb1c01c84f40df38a699d460b66d90401f9fe9eb4705a","title":"`Echinodermata (Q44631)`","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/01"}}
{"id":"train_70","question":"What are the scholarly articles published in the peer-reviewed open-access journal ZooKeys in 2018, including their publication dates, and if available, their Wikimedia Commons categories and links to their Wikimedia Commons pages? Order results by their publication dates from oldest to newest.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?date ?commonscat WHERE { ?item wdt:P1433 wd:Q219980 ; wdt:P577 ?date ; wdt:P31 wd:Q13442814 . FILTER ( YEAR ( ?date ) = 2018 ) . OPTIONAL { ?item wdt:P373 ?commonscat } SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' } } ORDER BY ASC ( ?date )","paraphrases":[],"info":{"id":"2abb29dda184146b7c7e30299a0d51d7e21c7d668914bd5b3f43a166684d0136","title":"Scholarly articles with images on Commons","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/09"}}
{"id":"train_71","question":"How many humans in Wikidata are identified as non-binary, intersex, trans woman, or trans man, along with their respective labels?","sparql":"SELECT ?sex ?sexLabel ?count\nWITH\n{\n    SELECT ?sex (COUNT(?human) AS ?count)\n    WHERE\n    {\n        ?human wdt:P31 wd:Q5.\n        ?human wdt:P21 ?sex.\n       VALUES ?sex {wd:Q48270 wd:Q1097630 wd:Q1052281 wd:Q2449503}.\n    }\n    GROUP BY ?sex\n} AS %results\nWHERE\n{\n    INCLUDE %results.\n    SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n}\n","paraphrases":[],"info":{"id":"9938b600c69cbfb018e722976f77fd1ee5df27bf04dcb2436466cac1d0330e29","title":"how many trans-people in Wikidata?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/01"}}
{"id":"train_72","question":"Who are citizens of Norway that have held a position as a teacher or a subclass of teacher, along with their labels, dates of birth (if available), and Norwegian historical register of persons IDs (if available)?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?P569 ?P4574 WHERE { ?item wdt:P27 wd:Q20 . ?item wdt:P39 / wdt:P279 * wd:Q37226 . OPTIONAL { ?item wdt:P569 ?P569 . } OPTIONAL { ?item wdt:P4574 ?P4574 . } }","paraphrases":[],"info":{"id":"a925ada4a5585e1633cd72a2ab58d1f12fd35f9d796701fe3adb69c04ddb0b67","title":"List of teachers and the Querybuilder","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/11"}}
{"id":"train_73","question":"What are the scholarly articles that have an author with a series ordinal of \"1000\", and what is the highest series ordinal value for each of these articles, ordered by the highest series ordinal value in descending order? So, the answer should be article 1 has the highest ordinal of 5000, article 2 has the highest ordinal of 4000, etc.","sparql":"SELECT ?paper ?paperLabel ?count\nWITH {\n  SELECT ?paper WHERE {  \n     ?paper wdt:P31 wd:Q13442814.\n     ?paper p:P2093/pq:P1545 \"1000\" .\n  }\n} AS %papers \nWITH {\n  SELECT ?paper (MAX(xsd:integer(?val)) AS ?count) WHERE {\n     INCLUDE %papers .\n     ?paper p:P2093/pq:P1545 ?val .\n  } GROUP BY ?paper \n} AS %author_count\nWHERE {\n   INCLUDE %author_count .\n   SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n}                  \nORDER BY DESC(?count)\n","paraphrases":[],"info":{"id":"35b281aac5fd63acd70949996941722b2185f83a623822ac1bd4be425b37d116","title":"Papers with the most authors","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/03"}}
{"id":"train_74","question":"What are the films that have won the Academy Award for Best Picture, with only those that have a theatrical version length listed on Wikidata? For each such film, also include its director (if available) and duration (if available).","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?filmLabel ?duration ?film WHERE { ?film wdt:P31 wd:Q11424 . ?film wdt:P166 wd:Q102427 . OPTIONAL { ?film wdt:P57 ?director . } OPTIONAL { ?film p:P2047 ?durationStatement . } OPTIONAL { ?durationStatement ps:P2047 ?duration . } ?durationStatement a wikibase:BestRank . OPTIONAL { ?durationStatement pq:P518 ?version . } FILTER ( CONTAINS ( ?versionLabel , \"theatrical\" ) ) . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . ?film rdfs:label ?filmLabel . ?version rdfs:label ?versionLabel . } } ORDER BY ( ?filmLabel )","paraphrases":[],"info":{"id":"4ac150a80de7d27982c2b5acfbf15ba60089848387451db50fcb184ebf9f625c","title":"Select theatrical version if version label is available","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/12"}}
{"id":"train_75","question":"Who are the actresses that have won either the Academy Award for Best Supporting Actress or the Academy Award for Best Actress? Return a a tuple of the actress, the actress's IMBD ID (if available), the associated movie, and the associated movie's IMBD ID (if available).","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?actor ?actor_IMBD ?movie ?movie_IMBD { VALUES ?award { wd:Q106301 wd:Q103618 } { ?actor p:P166 ?award_statement . ?award_statement ps:P166 ?award . ?award_statement pq:P1686 ?movie . } UNION { ?movie p:P166 ?award_statement . ?award_statement ps:P166 ?award . ?award_statement pq:P1346 ?actor . } OPTIONAL { ?movie wdt:P345 ?movie_IMBD . } OPTIONAL { ?actor wdt:P345 ?actor_IMBD . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"1ac279a4ca0b912c0bef23ad282bb2a13129143de36096f8d24ad5b0c74acdd7","title":"All movies that won the awards","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/03"}}
{"id":"train_76","question":"Which items have a sibling who shares the same date of birth, but the sibling does not have a reciprocal sibling relationship back to the item? Return the item and their sibliing in each tuple, and no duplicate tuples.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT DISTINCT ?item ?itemLabel ?sibling ?siblingLabel WHERE { ?item wdt:P3373 ?sibling . ?item wdt:P569 ?dob . ?sibling wdt:P569 ?dob . filter not exists { ?sibling wdt:P3373 ?item . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"2d23a1c0efb9064629d95afb676b11c9c32307f5e9b4a94111585aa3850cc28d","title":"Twins with different place of birth","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/02"}}
{"id":"train_77","question":"What are the cities that are considered to be urban municipalities in Germany, independent cities of Germany, district capitals, Greater district towns, large district towns, large independent cities of Lower Saxony, or medium-sized district towns (in Germany)? Only return those that are still currently considered so (i.e., no end time qualifier). Return the city and the start date (if available) it is considered to be of that status.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?itemLabel ?urban_municipality_rankLabel ?start_date ?end_date WHERE { VALUES ?type { wd:Q42744322 wd:Q22865 wd:Q134626 wd:Q448801 wd:Q1548518 wd:Q1548525 wd:Q54935786 } ?item p:P31 / p:P279 * ?statement . ?statement ps:P31 ?type . optional { ?statement pq:P580 ?start_date . } optional { ?statement pq:P582 ?end_date . } filter not exists { ?statement pq:P582 ?end_date . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by ?itemLabel","paraphrases":[],"info":{"id":"badbe0dd598da2dfa2b911582d553e994ea6230d44c5e2ceda440c67b8cb48a3","title":"Data issue discussion","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/12"}}
{"id":"train_78","question":"Who are composers that have lived in either Los Angeles or New York City? For each composer, determine whether they lived longer in LA or NYC. Return a list of 3-tuples in your response, consisting of: (the composer, x, y) where x should be \"LA\" if they lived in LA longer and empty if they lived in \"NYC\" longer, similar for y. So, for instance, if composer \"Olivia Rodrigo\" lived in NYC longer, you should return (Olivia Rodrigo, \"\", \"NYC\"), and they lived in LA longer then you should return (Olivia Rodrigo, \"LA\", \"\")","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?composer ?composerLabel ( MAX ( ?LA ) AS ?Los_Angelses ) ( MAX ( ?NYC ) AS ?New_York ) WHERE { VALUES ?residence { wd:Q65 wd:Q60 } ?composer wdt:P31 wd:Q5 . ?composer wdt:P106 / wdt:P279 * wd:Q36834 . ?composer wdt:P551 / wdt:P131 * ?residence . BIND ( IF ( ?residence = wd:Q65 , \"LA\" , \"\" ) AS ?LA ) BIND ( IF ( ?residence = wd:Q60 , \"NYC\" , \"\" ) AS ?NYC ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } GROUP BY ?composer ?composerLabel","paraphrases":[],"info":{"id":"cfde298d2462f506bbb8628cac48e7e30468e12c5f8d5f9039b0fc429284da59","title":"List composers residences","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/08"}}
{"id":"train_79","question":"What are the items that are either located in Argentona, have Argentona as their place of birth, place of death, or residence?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?Argentona WHERE { { ?Argentona wdt:P131 wd:Q11539 } union { ?Argentona wdt:P19 wd:Q11539 } union { ?Argentona wdt:P20 wd:Q11539 } union { ?Argentona wdt:P551 wd:Q11539 } }","paraphrases":[],"info":{"id":"298f5f8dfe39ce952fb5dc11552c3281cb38c4beea95d4e81d2a376b2bb2475d","title":"multiple querrys in one","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/05"}}
{"id":"train_80","question":"Which nonprofit organizations had a total revenue in 2017? Please include the organization's name, the revenue amount, the unit of the revenue, and the specific point in time.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?revenue ?unitLabel ?time WHERE { ?item wdt:P31 / wdt:P279 * wd:Q163740 . ?item p:P2139 ?stat . ?stat psv:P2139 / wikibase:quantityAmount ?revenue . ?stat psv:P2139 / wikibase:quantityUnit ?unit . ?stat pq:P585 ?time . FILTER ( \"2017-00-00\" ^^ xsd:dateTime <= ?time && ?time < \"2018-00-00\" ^^ xsd:dateTime ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"65bebeb065b5fdea329074c863af378d9e2470a04f4c7e7fd73aa1fca2737c5b","title":"All NGOs with revenue in 2017","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/02"}}
{"id":"train_81","question":"What are the distinct border checkpoints that are part of the Schengen Area border, excluding those that have been dissolved, are part of an open border, a maritime boundary, the Inner German border, or air borders? Please include their labels and coordinates, if available.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?itemLabel ?coord WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } ?item wdt:P31 wd:Q757292 . ?item wdt:P361 * / wdt:P31 / wdt:P279 * wd:Q67371697 . MINUS { ?item wdt:P576 _:b2 . } MINUS { ?item wdt:P361 wd:Q17163396 . } MINUS { ?item wdt:P361 wd:Q3089219 . } MINUS { ?item wdt:P361 wd:Q700754 . } MINUS { ?item wdt:P361 wd:Q67218438 . } OPTIONAL { ?item wdt:P625 ?coord . } }","paraphrases":[],"info":{"id":"68812530cc9aaa9d68896f0f989a001ba776fa52e5fcf7c1ad227eeb69c88433","title":"Time out","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/09"}}
{"id":"train_82","question":"Which taxa have been described by the New Zealand radio programme \"Critter of the Week\" that also have a common name in English? Each taxon should also be itself a class or has a parent (can be recursive) that is a class. Include in each tuple the taxon, (one of) its English common name, and the taxon that is a class.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?taxon_common_name ?parent ?parentLabel WHERE { ?item wdt:P1343 wd:Q58450498 ; wdt:P1843 ?taxon_common_name . ?item wdt:P171 * ?parent . ?parent wdt:P105 wd:Q37517 . FILTER ( langMatches ( lang ( ?taxon_common_name ) , \"en\" ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"cfca6274fe0cf4d0dc26149cb75acb644877e37388776a43c31e7895523bfb6d","title":"Taxonomic class for Critter of the Week","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/11"}}
{"id":"train_83","question":"What are the different occupations of individuals who have a Vatican Library VcBA ID, and how many distinct individuals are there for each occupation, ordered by the count in descending order?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?type ( COUNT ( DISTINCT ?item ) AS ?count ) WHERE { ?item wdt:P8034 ?id . ?item wdt:P106 ?occ . BIND ( ?occ AS ?type ) } GROUP BY ?type ORDER BY DESC ( ?count )","paraphrases":[],"info":{"id":"70032686a534cc153df0af6f7849babbc1f75571972e6d44a23ee93547b24d16","title":"Group minor results","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/06"}}
{"id":"train_84","question":"What are the Wikidata properties related to politics that are also used as identifiers?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?Wikidata_egenskap_knyttet_til_politikk ?Wikidata_egenskap_knyttet_til_politikkLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } ?Wikidata_egenskap_knyttet_til_politikk wdt:P31 wd:Q22984475 . ?Wikidata_egenskap_knyttet_til_politikk wdt:P31 wd:Q19847637 }","paraphrases":[],"info":{"id":"0e7ce0bb2191a9b00237ca420bf7bdea1290e0b0a2f35488af80e3fb9b382aa0","title":"Wikidata property related to politics","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/09"}}
{"id":"train_85","question":"What are the bunkers located within a 30 km radius around the Gravesend Cold War Bunker?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item WHERE { { SELECT DISTINCT ?item WHERE { wd:Q26676412 wdt:P625 ?targetLoc . SERVICE wikibase:around { ?item wdt:P625 ?location . bd:serviceParam wikibase:center ?targetLoc . bd:serviceParam wikibase:radius \"30\" . bd:serviceParam wikibase:distance ?dist . } ?item wdt:P31 / wdt:P279 * wd:Q91122 . } } }","paraphrases":[],"info":{"id":"791ec420ab4179d94a6df023cb9cd8de373c063a082a423d3a46ca3e199e4dda","title":"wikibase:around not including itself","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/05"}}
{"id":"train_86","question":"Which universities located in Berlin were founded before 1890, excluding those that were dissolved, abolished, or demolished before 1890? Please include their founding dates.","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?university ?founded WHERE { { { SELECT DISTINCT ?subclass { ?subclass wdt:P279 * wd:Q3918 } } } . ?university wdt:P131 + wd:Q64 ; wdt:P31 ?subclass ; wdt:P571 ?founded . FILTER ( YEAR ( ?founded ) < 1890 ) . MINUS { ?university wdt:P576 ?date . FILTER ( YEAR ( ?date ) < 1890 ) . } . }","paraphrases":[],"info":{"id":"dc871e4406f01fce8a42c79df8f7811c59d2d08c9a5856b91c9e68c7660faf4d","title":"Universities that existed in Berlin in 1890","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2016/08"}}
{"id":"train_87","question":"What are the items listed on the National Heritage List for England that have a label containing the word \"cinema\" (case insensitive) but are not instances of a movie theater?","sparql":"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item WHERE { ?item wdt:P1216 [] . ?item rdfs:label ?itemLabel . FILTER ( CONTAINS ( LCASE ( ?itemLabel ) , \"cinema\" @en ) ) . MINUS { ?item wdt:P31 wd:Q41253 } . }","paraphrases":[],"info":{"id":"7302bb9f6b2e64c0ae3f0782e76cc3b9117a6e8e69fabf0478d7db3da3b331cc","title":"Description containing a certain word","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/09"}}
{"id":"train_88","question":"What are the headquarters locations of the companies Apple, Amazon, Microsoft, Meta, and Google, including the cities, specific location if available (e.g. Apple Park), and states in the United States where these headquarters are located? Include in your response for each company, its specific location (if available), the city, and the state.\n","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?company ?location ?city ?state WHERE { VALUES ?company { wd:Q312 wd:Q3884 wd:Q2283 wd:Q380 wd:Q95 } ?company p:P159 ?HQ_statement . ?HQ_statement ps:P159 ?city . OPTIONAL { ?HQ_statement pq:P276 ?location . } ?city wdt:P131 + ?state . ?state wdt:P31 wd:Q35657 . } GROUP BY ?company ?location ?city ?state ORDER BY ASC ( ?company )","paraphrases":[],"info":{"id":"ddfb9d48778387e57b79cdb1199434641a29498cf4775e8ae69610055b86c02c","title":"Access Wikidata property qualifiers","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_89","question":"Who are the current members of the European Union, ordered by their names in English?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> select ?item ?itemLabel where { ?item p:P463 ?stm . ?stm ps:P463 wd:Q458 . MINUS { ?stm pq:P582 [] . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by ( ?itemLabel )","paraphrases":[],"info":{"id":"ca1bdbff9b1592b7cb262ebb8edb578828252d989a2165df93a4bb294d7dc056","title":"Member of EU (without UK)","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/12"}}
{"id":"train_90","question":"What are the names and dates of birth of individuals who have held the position of Pope, ensuring that the dates of birth are precise to the day?","sparql":"PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?dob WHERE { ?item wdt:P39 wd:Q19546 . ?item p:P569 ?dob_statement . ?dob_statement psv:P569 ?dob_value . ?dob_value wikibase:timeValue ?dob . ?dob_value wikibase:timePrecision 11 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"c3d78787b16d3efe2717472750df0f2f1e2fec7234e1e83eec409b716bbd488d","title":"Excluding imprecise dates from the results","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/05"}}
{"id":"train_91","question":"What are the villages within a 27 km radius from the village of Półwsie in Lower Silesian, Poland, including their coordinates?","sparql":"#Display villages within the specific radius from a specific place\n\nSELECT ?place ?location WITH {\n  SELECT ?place ?location {\n  wd:Q7264829 wdt:P625 ?polvillLoc .\n  SERVICE wikibase:around {\n    ?place wdt:P625 ?location.\n    bd:serviceParam wikibase:center ?polvillLoc;\n      wikibase:radius \"27\".\n  }\n  ?place wdt:P31 wd:Q3558970 .\n }\n } AS %i WHERE {\n  include %i\n}","paraphrases":[],"info":{"id":"fad8c83fd7915ce9886d89e45800f20b4f6d47d855334aa16ef46011119ea8df","title":"Limit coordinates and link to Wikipedia","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/05"}}
{"id":"train_92","question":"What are the items described at a URL containing \"https://www.flickr.com/\" that do not have an associated image?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?item ?url WHERE { ?item wdt:P973 ?url . optional { ?item wdt:P18 ?image . } filter ( bound ( ?image ) = false ) filter ( contains ( str ( ?url ) , \"https://www.flickr.com/\" ) ) }","paraphrases":[],"info":{"id":"3369f35b3aea9c1ca22581972fea4665ec46e023582f5511975b11bab7aa6e50","title":"Write a query for me please","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/03"}}
{"id":"train_93","question":"What are the details of sculptors associated with the Art Nouveau movement? Additionally, provide their gender (if available), occupation (if available), image (if available), place of birth (if available), and date of birth (if available).","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?gender ?image ?place ?date ?profession WHERE { ?item wdt:P106 wd:Q1281618 ; wdt:P135 wd:Q34636 . OPTIONAL { ?item wdt:P21 ?gender . } OPTIONAL { ?item wdt:P18 ?image . } OPTIONAL { ?item wdt:P19 ?place . } OPTIONAL { ?item wdt:P569 ?date . } OPTIONAL { ?item wdt:P106 ?profession . } }","paraphrases":[],"info":{"id":"6f0f4f4631eefba66c7acfb34aaf6f853e576368248d27808b4845b141682b45","title":"Female form of label","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/02"}}
{"id":"train_94","question":"Who are the female science fiction writers and/or those associated with the science fiction genre, who either have German as their native language, speak or write German, are citizens of Germany (including the German Democratic Republic, West Germany, or Nazi Germany), and/or were born in a place located within these regions? For each person, return also their dates of birth and death (both if available), then Order the list alphabetically by name.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?person ?personLabel ?dob ?dod WHERE { ?person wdt:P31 wd:Q5 . ?person wdt:P21 wd:Q6581072 . { ?person wdt:P106 wd:Q18844224 } union { ?person wdt:P136 / wdt:P279 * wd:Q24925 . } { ?person wdt:P103 wd:Q188 . } union { ?person wdt:P1412 wd:Q108 . } union { ?person wdt:P27 ?Germanish . } union { ?person wdt:P19 / wdt:P131 * ?Germanish . } VALUES ?Germanish { wd:Q183 wd:Q16957 wd:Q713750 wd:Q7318 } optional { ?person wdt:P569 ?dob } optional { ?person wdt:P570 ?dod } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by ?personLabel","paraphrases":[],"info":{"id":"3703ff993994d299e9ea659f338b30555c4747e237f957768e0402b1d1de2c16","title":"Female German-language science-fiction writers","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/04"}}
{"id":"train_95","question":"What are the details of astronauts, including their name, country of citizenship, astronaut mission, time in space, date of birth, and start of their work period, if available?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?nombre ?pa_s_de_nacionalidad ?misi_n_del_astronauta ?premio_recibido ?fecha_de_nacimiento ?inicio_del_periodo_de_actividad WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P106 wd:Q11631 . OPTIONAL { ?item wdt:P2561 ?nombre . } OPTIONAL { ?item wdt:P27 ?pa_s_de_nacionalidad . } OPTIONAL { ?item wdt:P450 ?misi_n_del_astronauta . } OPTIONAL { ?item wdt:P2873 ?premio_recibido . } OPTIONAL { ?item wdt:P569 ?fecha_de_nacimiento . } OPTIONAL { ?item wdt:P2031 ?inicio_del_periodo_de_actividad . } }","paraphrases":[],"info":{"id":"d6f9c58f37d72f5fe894b47bd3de70257ceb7ce93a8c02b6e51fbbb7cc3d7f8d","title":"astronautas","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/10"}}
{"id":"train_96","question":"Which libraries are located in the region of Abruzzo?","sparql":"SELECT ?item with \n{ select ?item where \n  {\n    ?item (wdt:P131/wdt:P131*) wd:Q1284.\n   } \n} as %i where\n{ \n  include %i\n?item (wdt:P31/wdt:P279*) wd:Q7075.\n}\n","paraphrases":[],"info":{"id":"e84bc54ddb3f26c1bff8e78183afab46112b41b2ee8c1843c875970d132ff2d7","title":"List of libraries by region","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/10"}}
{"id":"train_97","question":"Who are the individuals with the family name \"Walker\" whose occupation is either a drawer, engraver, or printmaker, including dates of birth and dates of death (if available)?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?date_of_birth ?date_of_death WHERE { VALUES ?occupation { wd:Q15296811 wd:Q329439 wd: wd:Q11569986 } ?item wdt:P31 wd:Q5 . ?item wdt:P106 / wdt:P279 * ?occupation . { ?item wdt:P734 wd:Q1158605 . } OPTIONAL { ?item wdt:P569 ?date_of_birth . } OPTIONAL { ?item wdt:P570 ?date_of_death . } }","paraphrases":[],"info":{"id":"96941fcc970f3f3792c0e0b4a8216cf1beca747aabcdbac8174a2c45128c1de8","title":"Draughtsmen and Engravers called A. Walker or W. Walker","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_98","question":"Select 10 video games ordered by item ID, and list their platform and genre.","sparql":"SELECT ?item ?platform ?genre with {\n  SELECT ?item WHERE \n  {\n    ?item wdt:P31 wd:Q7889 .\n  } ORDER BY ?item LIMIT 10 } as %i\nWHERE\n{ \n  include %i\n  ?item wdt:P400 ?platform.\n  ?item wdt:P136 ?genre.\n}","paraphrases":[],"info":{"id":"493d9e402f13162563bddaf4a959a3d5fa02fb2312ced845c6960f6d1f361a43","title":"Get all release dates, platforms, genres, etc. for a video game in one query","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/02"}}
{"id":"train_99","question":"What are the characters that are part of the English alphabet, along with their Unicode characters and Unicode character statements, excluding those that have a Unicode code point qualifier?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SElECT ?item ?unicode_character ?unicode_character_statement WHERE { ?item wdt:P361 wd:Q754673 . ?item p:P487 ?unicode_character_statement . ?unicode_character_statement ps:P487 ?unicode_character . MINUS { ?unicode_character_statement pq:P4213 [] . } }","paraphrases":[],"info":{"id":"05ddec68e818a1a379060084759ce1fc81caa49a49b6c58ac5d4aab39d19bbd8","title":"Items satisfying one property statement, but not having one qualifier","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/02"}}
{"id":"train_100","question":"Who has held the position of Director of the Scuola Normale Superiore? If available, Please provide their years of birth, years of death, start years of the position, end years of the position, and Treccani IDs.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?birthyear ?deadyear ?startyear ?endyear ?trec WHERE { ?item wdt:P39 wd:Q41210386 . ?item p:P39 ?position . ?position ps:P39 wd:Q41210386 . OPTIONAL { ?item wdt:P569 ?db . } OPTIONAL { ?item wdt:P570 ?dd . } OPTIONAL { ?position pq:P580 ?st . } OPTIONAL { ?position pq:P582 ?en . } OPTIONAL { ?item wdt:P3365 ?trec . } BIND ( str ( YEAR ( ?db ) ) AS ?birthyear ) BIND ( str ( YEAR ( ?dd ) ) AS ?deadyear ) BIND ( str ( YEAR ( ?st ) ) AS ?startyear ) BIND ( str ( YEAR ( ?en ) ) AS ?endyear ) }","paraphrases":[],"info":{"id":"e356658060d83e4692e7267b2277e20a4faac1d3bcaf7a32a576c98407a3ba48","title":"Directors of the Scuola Normale Superiore","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/09"}}
{"id":"train_101","question":"Which countries have never had a citizen or sports representative who participated in an event and received an Olympic medal? Exclude historical countries and countries that were dissolved, abolished, or demolished before 1896.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?country WHERE { ?country wdt:P31 wd:Q7275 . MINUS { ?country wdt:P31 wd:Q3024240 } . MINUS { ?country wdt:P576 ?date . FILTER ( YEAR ( ?date ) < 1896 ) . } . MINUS { ?person ( wdt:P27 | wdt:P1532 ) ?country ; p:P1344 / pq:P166 / wdt:P279 * wd:Q636830 . } . }","paraphrases":[],"info":{"id":"29e8a97feaa01fde3f77cd3a7016576be25b4b6840f357f3dd462bbf6f4f06c7","title":"Countries that have never won a medal at the Olympics","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2016/08"}}
{"id":"train_102","question":"Get the items and English item labels that are instances or subclasses of a type of sport, along with a single (maximum-valued) image, if available.","sparql":"SELECT ?item ?image ?label WITH {\n  SELECT ?item (MAX(?p18) AS ?image) {\n    ?item wdt:P31/wdt:P279* wd:Q31629 .\n    OPTIONAL { ?item wdt:P18 ?p18 } .\n  } GROUP BY ?item\n} AS %subquery WHERE {\n  INCLUDE %subquery .\n  ?item rdfs:label ?label .\n  FILTER ( LANG( ?label ) = \"en\" ) .\n} ","paraphrases":[],"info":{"id":"b1f17481c28e52591209b4595343f539f2758f1430b7e24aa39ec717f424d8af","title":"Search for with subclass depth, first image and return labels in all languages","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/02"}}
{"id":"train_103","question":"What are the items that are instances of structures such as buildings, hospitals, theatre buildings, sculptures, restaurants, commemorative plaques, metro stations, gardens, houses, main libraries, private educational institutions in Catalonia, hotels, church buildings, historic buildings, EADA Business School, movie theaters, Catalonia schools, Catalonia Institutes, bookstores, Catholic church buildings, libraries, fountains, or art galleries, and are located within a combined distance of less than 2.54 units from both the coordinates of Espina del mar and Port. Inauguració bocana nord?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX geof: <http://www.opengis.net/def/function/geosparql/> SELECT ?item WHERE { VALUES ?inst { wd:Q41176 wd:Q16917 wd:Q24354 wd:Q860861 wd:Q11707 wd:Q721747 wd:Q928830 wd:Q1107656 wd:Q3947 wd:Q12317349 wd:Q111594067 wd:Q27686 wd:Q16970 wd:Q35112127 wd:Q1273818 wd:Q41253 wd:Q111236457 wd:Q50359544 wd:Q200764 wd:Q1088552 wd:Q7075 wd:Q483453 wd:Q1007870 } . ?item wdt:P31 ?inst . ?item wdt:P625 ?coord . wd:Q99509385 wdt:P625 ?focus1 . wd:Q113663833 wdt:P625 ?focus2 . BIND ( geof:distance ( ?coord , ?focus1 ) + geof:distance ( ?coord , ?focus2 ) as ?d ) . FILTER ( ?d < 2.54 ) . }","paraphrases":[],"info":{"id":"e9e2d74a71d30759826b34566ef63b7bd3bae6624cb2faf1c7fd3d8ed9668176","title":"Addition that work in PetScan","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/02"}}
{"id":"train_104","question":"What are the population, male population, and female population of Sankt Andreasberg at different points in time, ordered by date?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?point_in_time ?population ?malePopulation ?femalePopulation WHERE { { wd:Q661700 p:P1082 _:wp . _:wp ps:P1082 ?population . _:wp pq:P585 ?point_in_time . BIND ( YEAR ( ?point_in_time ) AS ?Jahr ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],de\" . } } UNION { wd:Q661700 p:P1540 _:mp . _:mp ps:P1540 ?malePopulation . _:mp pq:P585 ?point_in_time . } UNION { wd:Q661700 p:P1539 _:fp . _:fp ps:P1539 ?femalePopulation . _:fp pq:P585 ?point_in_time . } } ORDER BY ?point_in_time","paraphrases":[],"info":{"id":"f0b60d7a04b032388e4d93660cdb141d1edcc9146ecf7ad4e4167d1f156b2a87","title":"population chart","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/11"}}
{"id":"train_105","question":"Who are the members of the historic Lower House and Upper House of the Parliament of Sweden, whose party's Sweedish label contain the string \"vilde\" in their party name? For each person, also return the associated party, and the start (if available) and end (if available) times of the party.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?wd ?party ?startvilde ?endvilde WHERE { SERVICE <https://query.wikidata.org/sparql> { VALUES ?position { wd:Q81531912 wd:Q33071890 } ?wd wdt:P31 wd:Q5 ; wdt:P39 ?position . ?wd rdfs:label ?name . FILTER ( lang ( ?name ) = \"sv\" ) { ?wd p:P102 ?PartyWD . ?PartyWD ps:P102 ?p OPTIONAL { ?PartyWD pq:P580 ?startvilde } OPTIONAL { ?PartyWD pq:P582 ?endvilde } ?p rdfs:label ?party . FILTER ( LANG ( ?party ) = \"sv\" ) . FILTER ( CONTAINS ( ?party , 'vilde' ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"sv,en\" . } } } }","paraphrases":[],"info":{"id":"d6c28fd28e8f4ece9e8a5f15bfe84303b578e5d9da3d21693276ee11442b4002","title":"Persons who dont have a picture","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/05"}}
{"id":"train_106","question":"Who are the chess players with an OlimpBase Chess Olympiad player ID who somehow have not participated in any Chess Olympiad event?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel WHERE { ?item wdt:P3940 ?value . MINUS { ?item wdt:P1344 ?olymp . ?olymp wdt:P31 wd:Q428303 . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"de,en\" } . } LIMIT 1000","paraphrases":[],"info":{"id":"87514dd90ec4d394a9cc19966764c47a006e25e74fae20ebed8287f1bb541b46","title":"Chess olympiad participantes","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/09"}}
{"id":"train_107","question":"What are the items with numerical values greater than 10,000,000 that are instances of large numbers in Wikidata, along with their numerical values?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?valeur ?itemLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } ?item wdt:P1181 ?valeur . FILTER ( ?valeur > 10000000 ) ?item wdt:P31 wd:Q1816844 . } group by ?item ?valeur ?itemLabel","paraphrases":[],"info":{"id":"cc92b0c2aff5f48f8a40e147b742b6a7b04bb02a17cd76b885fb28c44f4b2123","title":"Rest of division","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_108","question":"Which films have received the Academy Award for Best Director after 2010? Please also include the year they received the award and their IMDb ID if available.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel ( YEAR ( ?time ) as ?year ) ?IMDb_ID WHERE { ?item wdt:P31 wd:Q11424 ; p:P166 ?oscar_statement . ?oscar_statement ps:P166 wd:Q103360 ; pq:P585 | ( pq:P805 / wdt:P585 ) ?time . OPTIONAL { ?item wdt:P345 ?IMDb_ID . } ?oscar_statement wikibase:rank ?rank . FILTER ( ?rank = wikibase:PreferredRank || ( ?rank = wikibase:NormalRank && NOT EXISTS { ?item p:P166 / wikibase:rank wikibase:PreferredRank . } ) ) FILTER ( YEAR ( ?time ) > 2010 ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } }","paraphrases":[],"info":{"id":"cca35331605fcaa99f07e066f70091099c231f7adacf6ed4a9742c9cd610802b","title":"List of Oscar Best Movies","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/03"}}
{"id":"train_109","question":"What are the communes of France with postal codes ranging from 85001 to 85999 (both inclusive)? For each commune, include the postal code, its images (if available) and official websites (if available).","sparql":"PREFIX schema: <http://schema.org/>\nSELECT ?commune ?communeLabel ?communeImage ?communePostalCode ?communeWebsite\n    \n    WITH {\n      SELECT ?commune ?communePostalCode WHERE {\n        ?commune wdt:P31 wd:Q484170;\n                 p:P625 ?coordinate.\n        ?coordinate psv:P625 ?coordinate_node.\n        ?commune wdt:P281 ?communePostalCode\n        FILTER (?communePostalCode > \"85000\" && ?communePostalCode < \"86000\")\n      }\n      GROUP BY ?commune ?communePostalCode\n    } AS %results \n    \n    WHERE {\n      INCLUDE %results.\n      OPTIONAL { ?commune wdt:P18 ?communeImage }.\n      OPTIONAL { ?commune wdt:P856 ?communeWebsite }.\n\n      SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n    }\n\nORDER BY ?communePostalCode","paraphrases":[],"info":{"id":"d2c50e9b837d856607b51a099b09b9e67bf340eaebfadd40f110516691829168","title":"Optimization: query to get all french communes with some datas","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/02"}}
{"id":"train_110","question":"What are the planets beyond the Solar System in Wikidata with at least one associated image? Return the planet and the associated image(s).","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?exoplanet ?exoplanetLabel ?image WHERE { ?exoplanet wdt:P31 wd:Q44559 ; wdt:P18 ?image . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"17688c6a21a95c1b953a16cae0d71d0b7d2bfcfc883d13f177b3bcf9e185cef8","title":"Show Photo Attribution","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/08"}}
{"id":"train_111","question":"What are the departments in France and their INSEE department codes? Additionally, provide the following statistics about church buildings located within each department: the total count of church buildings, the count of church buildings without coordinates, the count of church buildings without images, the percentage of church buildings with coordinates, and the percentage of church buildings with images. Order results from lower to higher INSEE codes.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?INSEE ?itemLabel ?depCount ( IF ( ?_withCoord > ?depCount , 0 , ?depCount - ?_withCoord ) AS ?withoutCoord ) ( IF ( ?_withImg > ?depCount , 0 , ?depCount - ?_withImg ) AS ?withoutImg ) ( ROUND ( ( IF ( ?_withCoord > ?depCount , ?depCount , ?_withCoord ) / ?depCount ) * 100 * 100 ) / 100 AS ?withCoord ) ( ROUND ( ( IF ( ?_withImg > ?depCount , ?depCount , ?_withImg ) / ?depCount ) * 100 * 100 ) / 100 AS ?withImg ) WHERE { { SELECT ?item ( COUNT ( DISTINCT ?item2 ) AS ?depCount ) ( COUNT ( DISTINCT ?coord ) AS ?_withCoord ) ( COUNT ( DISTINCT ?img ) AS ?_withImg ) WHERE { ?commune wdt:P31 / wdt:P279 * wd:Q484170 . ?item2 wdt:P31 / wdt:P279 * wd:Q16970 . hint:Prior hint:gearing \"forward\" . ?item2 wdt:P131 ?commune . ?commune wdt:P131 ?item . ?item wdt:P2586 ?INSEE . OPTIONAL { ?item2 wdt:P625 ?coord } . OPTIONAL { ?item2 wdt:P18 ?img } . } GROUP BY ?item } . ?item wdt:P2586 ?INSEE . SERVICE wikibase:label { bd:serviceParam wikibase:language \"fr\" } . } ORDER BY ?INSEE","paraphrases":[],"info":{"id":"ec5ea2fd0d137a504dc29ff8562d958a8f70a7247d5159f5ab3f1cc190511a69","title":"Query failing","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/02"}}
{"id":"train_112","question":"What are the items described at a URL starting with \"https://www.redib.org/recursos/Serials/Record/oai_revista\" (disregarding the `<` character) along with their titles (if available) and ISSNs (if available)?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?item ?title ?issn ?url WHERE { ?item wdt:P973 ?url . FILTER ( SUBSTR ( STR ( ?url ) , 1 , 57 ) = \"https://www.redib.org/recursos/Serials/Record/oai_revista\" ) . OPTIONAL { ?item wdt:P1476 ?title . } OPTIONAL { ?item wdt:P236 ?issn . } }","paraphrases":[],"info":{"id":"07d5344a450e1e8e3d850177fd6a270f7f8071eaaa58ce0d280b2e396783b74a","title":"Specific url in a specific property","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2016/12"}}
{"id":"train_113","question":"Who are the female tennis players that were either born in Belarus and/or represent Belarus in sports and are still considered to be players (i.e. do not have a recorded end date of profession)? In addition, for each player, if rating information is available, include their most recent rating and when that rating started to take effect.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel ?rating ?when WHERE { BIND ( wd:Q10833314 AS ?tennisPlayer ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],be-tarask,uk,pl,en\" . } ?item wdt:P31 wd:Q5 . ?item wdt:P21 wd:Q6581072 . { ?item wdt:P19 wd:Q184 . } UNION { ?item wdt:P19 / wdt:P131 * wd:Q184 . } UNION { ?item wdt:P1532 wd:Q184 . } ?item p:P106 ?profession . ?profession ps:P106 ?tennisPlayer . FILTER NOT EXISTS { ?profession pq:P582 ?x } OPTIONAL { ?item p:P1352 ?singleRanking . ?singleRanking ps:P1352 ?rating . ?singleRanking pq:P641 wd:Q18123880 . ?singleRanking pq:P585 ?when . } filter not exists { ?item p:P1352 ?singleRanking2 . ?singleRanking2 ps:P1352 ?rating2 . ?singleRanking2 pq:P641 wd:Q18123880 . ?singleRanking2 pq:P585 ?when2 . filter ( str ( ?singleRanking ) != str ( ?singleRanking2 ) ) filter ( ?when2 > ?when ) } }","paraphrases":[],"info":{"id":"034c5ba4086e08902992cad421bfb0d7d7dc1839f273730e349868e5ada13ff4","title":"Acting tennis players by ranking","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/10"}}
{"id":"train_114","question":"For each parliamentary terms of the House of Commons of Canada, how many members belong to each party? Count only those member with a recorded electoral district for that term.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> select distinct ?législatureLabel ( count ( distinct ?item ) as ?count ) ?groupeLabel where { SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } ?item p:P39 ?fonction ; wdt:P39 wd:Q15964890 . ?fonction ps:P39 wd:Q15964890 ; pq:P4100 ?groupe ; pq:P2937 ?législature ; pq:P768 ?circonscription . } group by ?législatureLabel ?groupeLabel ?count ?rgb order by desc ( ?législatureLabel )","paraphrases":[],"info":{"id":"ca1cf9373404e3260f8f1a9c95104f6de08b3eb839c0a07832943c53cfc047a9","title":"specific colors","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/10"}}
{"id":"train_115","question":"For each member state of the UN, what are the number of seats in each of its legislative bodies? Do not count those that are considered to be particular legislative terms (e.g. \"42nd Canadian Parliament\"), or those that already are recorded as \"bicameral\" in nature (e.g., for the United States, you should return both US Senate and US House of Representatives, but not \"US Congress\").","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?appliestoLabel ?seats WHERE { ?item wdt:P1342 ?seats . ?item wdt:P1001 ?appliesto . ?appliesto wdt:P463 wd:Q1065 . minus { ?item wdt:P31 / wdt:P279 * wd:Q15238777 . } minus { ?item wdt:P31 wd:Q189445 . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by ?appliestoLabel","paraphrases":[],"info":{"id":"0bc83e14120a6adf24ad22f10359b20fa3a81a6d31d1ac1422dd167052e80090","title":"`number of seats (P1342)` (members in lower and upper houses)","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/01"}}
{"id":"train_116","question":"What are the musical instruments played by people who are affiliated with the University of Washington School of Music and have been educated at the University of Washington, and how many people play each instrument?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?instrument ?instrumentLabel ( COUNT ( ?student ) AS ?count ) WHERE { ?student wdt:P1303 ?instrument ; wdt:P1416 wd:Q98035717 ; wdt:P69 wd:Q219563 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" } } GROUP BY ?instrument ?instrumentLabel","paraphrases":[],"info":{"id":"92186df73074ceb2885fc51129d8ce26e88bccde9ab200cc1666ffa1bc7d9c24","title":"Query for all instruments played by people affiliated with a particular organization, and the number of those people who play each instrument","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/09"}}
{"id":"train_117","question":"Which individuals are citizens of Dominican Republic but were not born in Dominican Republic?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item WHERE { ?item wdt:P27 wd:Q786 . FILTER ( NOT EXISTS { ?item wdt:P19 ?place . ?place ( wdt:P131 * ) wd:Q786 . hint:Prior hint:gearing \"forward\" . } ) }","paraphrases":[],"info":{"id":"952c755fa8d032b863ae0f03281a8ce454e109b73a9cc8532ca7f1fe79387524","title":"Municipalties of Czech Republic","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/02"}}
{"id":"train_118","question":"What are the countries in the world, along with their population, Human Development Index (HDI), life expectancy, continent, and nominal GDP, ordered by descending HDI?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?population ?hdi ?lifeExpectancy ?continentLabel ?GDP WHERE { ?item wdt:P31 wd:Q6256 . ?item wdt:P1082 ?population . ?item wdt:P1081 ?hdi . ?item wdt:P30 ?continent . ?item wdt:P2250 ?lifeExpectancy . ?item wdt:P8744 / wdt:P2131 ?GDP . } ORDER BY DESC ( ?hdi )","paraphrases":[],"info":{"id":"cb05e7ca0be15d708689ca7b243286db244c41d117cb92def341dd86a9b8faab","title":"Need to select all the coutries in the world, and their GPD","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/04"}}
{"id":"train_119","question":"Who are the recipients of the Wollaston Medal, and in which year did they receive it, if available? Please list them in order of the date they received the award.","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?recipient ?recipientLabel ( YEAR ( ?time ) AS ?year ) WHERE { ?recipient p:P166 ?statement . ?statement ps:P166 wd:Q832424 . OPTIONAL { ?statement pq:P585 ?time . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?time","paraphrases":[],"info":{"id":"eda2d92b495b81bc4efc82d12819cac9b43003e4af91285890ded59a7ec31132","title":"including `point in time (P585)`","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/12"}}
{"id":"train_120","question":"What are the names, dates of birth (if available), dates of death (if available), positions held (if available), start times of those positions (if available), and end times of those positions (if available) of individuals who are citizens of Spain, were born in Madrid, and are politicians, statespersons, monarchs, or sovereigns?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?dateofbirth ?dateofdeath ?position ?starttime ?endtime WHERE { ?item wdt:P31 wd:Q5 ; wdt:P27 wd:Q29 ; wdt:P19 wd:Q2807 VALUES ?occupation { wd:Q82955 wd:Q372436 wd:Q116 wd:Q2304859 } ?item wdt:P106 ?occupation . OPTIONAL { ?item wdt:P570 ?dateofdeath . } OPTIONAL { ?item wdt:P569 ?dateofbirth . } OPTIONAL { ?item p:P39 ?p . ?p ps:P39 ?position . OPTIONAL { ?p pq:P580 ?starttime . } OPTIONAL { ?p pq:P582 ?endtime . } } SERVICE wikibase:label { bd:serviceParam wikibase:language \"es\" . } }","paraphrases":[],"info":{"id":"9d97c67d94263e31eae09da45237b1380bc3b6491790a86ef1978a2076107a16","title":"how to select P properties beneath a Q item","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/02"}}
{"id":"train_121","question":"Which pairs of different commercial airports share the same IATA code? Exclude military airports, railway stations, Royal Air Force stations, and airports that have been dissolved, abolished, or demolished. For each pair, return the shared IATA code and the two airports. ","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?code ?item1 ?item2 WHERE { ?item1 wdt:P31 / wdt:P279 * wd:Q1248784 . ?item1 p:P238 ?statement1 . ?statement1 ps:P238 ?code . minus { ?statement1 pq:P582 [] . } ?item2 p:P238 ?statement2 . ?statement2 ps:P238 ?code . minus { ?statement2 pq:P582 [] . } FILTER ( ?item1 != ?item2 ) minus { ?item1 wdt:P31 / wdt:P279 * wd:Q695850 . } minus { ?item1 wdt:P31 / wdt:P279 * wd:Q1311670 . } minus { ?item1 wdt:P31 / wdt:P279 * wd:Q7373622 . } minus { ?item2 wdt:P31 / wdt:P279 * wd:Q695850 . } minus { ?item2 wdt:P31 / wdt:P279 * wd:Q1311670 . } minus { ?item2 wdt:P31 / wdt:P279 * wd:Q7373622 . } minus { ?item1 wdt:P576 ?date } minus { ?item2 wdt:P576 ?date } SERVICE wikibase:label { bd:serviceParam wikibase:language \"fr,en\" . } } ORDER BY ?code","paraphrases":[],"info":{"id":"10dc4309cb0e21cdb7be742122432adfd04e8eadefcb58f5a561a7225d2f141f","title":"Adapting a query","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/07"}}
{"id":"train_122","question":"How many distinct official websites does each programming language have, ordered by the count in descending order? Each tuple in result should contains the language and its number of official websites.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?lang ( COUNT ( DISTINCT ?website ) as ?count ) WHERE { ?lang wdt:P31 / wdt:P279 * wd:Q9143 . ?lang p:P856 ?website . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" } } GROUP BY ?lang ?langLabel ORDER BY DESC ( ?count )","paraphrases":[],"info":{"id":"04de0d6063e846a05dcf318683e29a0e4fd14f9b2f42814e52ec4069a507efad","title":"Number of values of a property of each instance","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/03"}}
{"id":"train_123","question":"What are the archive agencies and instutions located in Switzerland? For each one, also include the cantons they are located in (if available), their ISIL identifiers (if available), and their GLAM IDs (if available).","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?canton ?ISIL ?GLAM WHERE { ?item wdt:P31 / wdt:P279 * wd:Q166118 . ?item wdt:P17 wd:Q39 . OPTIONAL { ?item wdt:P791 ?ISIL } OPTIONAL { ?item wdt:P3066 ?GLAM } OPTIONAL { ?item wdt:P131 * ?canton . ?canton wdt:P31 wd:Q23058 } }","paraphrases":[],"info":{"id":"17335fc934aad8dcad7b57bb074f85b9affd237cd8313382c230800add8ef103","title":"L'ensemble des archives en Suisse","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/10"}}
{"id":"train_124","question":"What are the items with INE municipality codes that are exactly 9 digits long, and what are their corresponding codes?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?item ?id WHERE { ?item wdt:P772 ?id . FILTER ( STRLEN ( ?id ) = 9 ) . }","paraphrases":[],"info":{"id":"527fd9c35870110c2ca20b8361a9dbc4cb885aae6a8c93d3b8ff5214694179c1","title":"Identifier with 11 digits","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/08"}}
{"id":"train_125","question":"Who participated in the 2018 Tour de France (the bicycle race), their current sports teams, and the year they started with their current team?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?person ?team ( year ( ?st ) as ?since ) WHERE { ?person wdt:P1344 wd:Q28859163 . ?person p:P54 ?teamStatement . ?teamStatement ps:P54 ?team . optional { ?teamStatement pq:P580 ?st } optional { ?teamStatement pq:P582 ?et } filter ( bound ( ?st ) && ! bound ( ?et ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by desc ( ?since )","paraphrases":[],"info":{"id":"1c4f8cbe51b6b836d572cb8fcff480918877925c2262892dae098824218ad752","title":"Getting property label","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/07"}}
{"id":"train_126","question":"Who are the Japanese citizens who born in the 15th and 16th centuries and what are their birthdates?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?person ?personLabel ?date_of_birth WHERE { ?person wdt:P31 wd:Q5 . ?person wdt:P27 wd:Q17 . ?person wdt:P569 ?date_of_birth . FILTER ( \"1400-00-00\" ^^ xsd:dateTime <= ?date_of_birth && ?date_of_birth < \"1600-00-00\" ^^ xsd:dateTime ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"d2cc23ab66bb40e4bc53f7aedd5dffde8ccda5cff973e6776078296a0f6c7ad7","title":"Persons from a certain time period and country","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/09"}}
{"id":"train_127","question":"What are the games, that have a North American video game content rating and were released on or before December 31, 1998? For each tuple, return the game, its ESRB rating, and the release date. One game can have multiple release dates, in which case they should appear in different rows.","sparql":"PREFIX p: <http://www.wikidata.org/prop/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?ESRB_rating ?released WHERE { ?item p:P852 / ps:P852 ?ESRB_rating . ?item wdt:P31 / wdt:P279 * wd:Q11410 . ?item wdt:P577 ?released . FILTER ( ?released <= \"1998-12-31T00:00:00Z\" ^^ xsd:dateTime ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"6980b28e1d1d5c58e48ec1bb7cd91d80c215aec4f8bda1826dec5d5e892c0c6a","title":"`ESRB rating (P852)`","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/07"}}
{"id":"train_128","question":"For each GUI toolkit or framework, how many items in Wikidata are using it? Include only those with some items using it (disregard those not being used by any item). Also, make sure that items using the framework in a different language is aslo counted towards the original one (e.g. the ones using PyGTK is also counted towards GTK).","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?toolkit ?toolkitLabel ?count WHERE { { SELECT ?toolkit ( count ( ?item ) as ?count ) WHERE { ?item wdt:P1414 / wdt:P1372 * ?toolkit . } GROUP BY ?toolkit } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" . } } ORDER BY DESC ( ?count )","paraphrases":[],"info":{"id":"2051bd76f2698af035fd2298851c6d23e1f01ee1defacb2613245d874b82aa79","title":"Count that groups subclasses of certain items","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2016/09"}}
{"id":"train_129","question":"What are the programming languaes and those considered to be file formats which are programmed in a language? For each one, also include its file extension format (e.g. txt).","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?ext where { { ?item wdt:P31 wd:Q235557 . ?item wdt:P277 ?lang . } UNION { ?item wdt:P31 / wdt:P279 * wd:Q9143 . } ?item wdt:P1195 ?ext SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" } } order by ?langLabel ?ext","paraphrases":[],"info":{"id":"8e55bc25512c474e8728427cfd84c7838869a8ce96c1f5a71cfb750203650f3e","title":"Is there a way to get list of typical file extensions of source code files?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/06"}}
{"id":"train_130","question":"What are the dams in Japan along with their coordinates, that are within 1.00001 kilometers of another dam? Include the nearby dam and its coordinate, and the distance between them. Each pair should only appear once.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?coord ?place ?location ?dist WHERE { ?item wdt:P31 / wdt:P279 * wd:Q12323 . ?item wdt:P625 ?coord . ?item wdt:P17 wd:Q17 SERVICE wikibase:around { ?place wdt:P625 ?location . bd:serviceParam wikibase:center ?coord . bd:serviceParam wikibase:radius \"1.00001\" . bd:serviceParam wikibase:distance ?dist . } ?place wdt:P31 / wdt:P279 * wd:Q12323 . filter ( str ( ?item ) < str ( ?place ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?dist","paraphrases":[],"info":{"id":"205576e826ea45a92c4ec4b0c9a065f57284342bf78ebeb017d274a0e4362d71","title":"Dam within 1km of another dam","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/08"}}
{"id":"train_131","question":"What are the countries and the percentage of out-of-school children in their population, rounded to two decimal places (e.g. literals such as '7.86')?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?country ?OOS { ?country wdt:P31 wd:Q6256 ; wdt:P1082 ?pop ; wdt:P2573 ?outOfSchool . BIND ( ROUND ( ( ?outOfSchool / ?pop * 100 ) * 100 ) / 100 AS ?OOS ) . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE], en\" . } }","paraphrases":[],"info":{"id":"8324b6405d158375611b086c6bce4b81d70dabc50a7d2f6c60fc60ca2b505607","title":"Percentage of out of school children (`number of out-of-school children (P2573)`) in population of a country","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/11"}}
{"id":"train_132","question":"What are the Nazi concentration camps or subcamps? Include the following way of finding such a camp: (1) those that are classified as a Nazi concentration camp, (2) those that are considered the subcamps, and (3) subsdiaries of Nazi concentration camps. For each one, also find its coordinates (e.g. literals such as `Point(9.1978 49.1686)'`). Each pair of camp and coordinate should only appear once.","sparql":"PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?camp ?coord WHERE { { ?camp wdt:P31 ?instance_of . ?instance_of wdt:P279 * wd:Q328468 . } UNION { ?camp wdt:P31 ?instance_of . ?instance_of wdt:P279 * wd:Q1719244 . } UNION { ?mother_camp wdt:P31 ?mc_instance_of . ?mc_instance_of wdt:P279 * wd:Q328468 . ?mother_camp wdt:P355 ?camp . ?camp wdt:P31 ?instance_of . } OPTIONAL { ?camp p:P625 ?stat . ?stat ps:P625 ?coord . } }","paraphrases":[],"info":{"id":"2c1cfba71661938d9a7861cdaae5693dcd08d3771f4e1c2fc2a2bc566e1a75d5","title":"Resumption of: https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04#list_of_Nazi_camps","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/03"}}
{"id":"train_133","question":"What are the items located in the United Kingdom that have an inception date but do not have an \"instance of\" statement?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel WHERE { ?item wdt:P17 wd:Q145 . ?item wdt:P571 ?P571 . filter not exists { ?item wdt:P31 [] . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"c0f4641f68b137f5d2c94ac9a299eb989dceb1e9615db4156c1ccd78b6c6c285","title":"Data quality : `inception (P571)` and `dissolved, abolished or demolished date (P576)`","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/11"}}
{"id":"train_134","question":"Who are the members of the Académie des sciences, belles-lettres et arts de Lyon, including their names, dates of birth (if available), dates of death (if available), start dates of their membership (if available), and end dates of their membership (if available)?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?date_de_naissance ?date_de_mort ?date_de_debut ?date_de_fin WHERE { ?st ps:P463 wd:Q730513 . ?item p:P463 ?st . OPTIONAL { ?item wdt:P569 ?date_de_naissance . } OPTIONAL { ?item wdt:P570 ?date_de_mort . } OPTIONAL { ?st pq:P580 ?date_de_debut . } OPTIONAL { ?st pq:P582 ?date_de_fin . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"3ebe3c801eee0758e8eaf1d532e9697d4bd6c01752d0a75d56360750f1f9c100","title":"Extraction d'un qualificatif lié à une propriété","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/04"}}
{"id":"train_135","question":"What are the current municipal formations (and its subclasses) in Russia within \"Kamchatka Krai\"?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?id WHERE { ?_ wdt:P131 * wd:Q7948 . ?locst ps:P131 ?_ . ?id p:P131 ?locst . ?__ wdt:P279 * wd:Q1849719 . ?id p:P31 / ps:P31 ?__ . MINUS { ?locst pq:P582 [] } } GROUP BY ?id","paraphrases":[],"info":{"id":"5d599e4fd7a4e4372d360b004f174809c3a1fc74b633fb983f7ea50371bceba1","title":"Russian districts","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/02"}}
{"id":"train_136","question":"What are the albums, their Bandcamp release IDs, and their tracks? Additionally, if available, provide the ISRC, MusicBrainz recording ID, Genius ID, and LyricsTranslate ID for each track. The results should be ordered by album label and track label.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?album ?bc ?track ?trackLabel ?ISRC ?MB ?G ?LT WHERE { ?album wdt:P31 / wdt:P279 * wd:Q482994 . ?album wdt:P11354 ?bc . ?album wdt:P658 ?track . OPTIONAL { ?track wdt:P1243 ?ISRC . } OPTIONAL { ?track wdt:P4404 ?MB . } OPTIONAL { ?track wdt:P6218 ?G . } OPTIONAL { ?track wdt:P7212 ?LT . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by ?albumLabel ?trackLabel","paraphrases":[],"info":{"id":"1ebecc42e5f61dd59dde58a9db5861db2c00f37139899dbfccbb5e52247b8f6a","title":"Tracks","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2024/01"}}
{"id":"train_137","question":"What are the municipalities of Belgium that have not been dissolved, abolished, or demolished, and do not have an inception date in the future?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q493522 . MINUS { ?item wdt:P576 [] } MINUS { ?item wdt:P571 ?date . FILTER ( DATATYPE ( ?date ) = xsd:dateTime && ?date > now () ) } SERVICE wikibase:label { bd:serviceParam wikibase:language \"nl,fr,de,en\" . } } ORDER BY ?itemLabel","paraphrases":[],"info":{"id":"80cf979695ac7926d0a2543f9d6ddda9d2e7b12d131d6d989f57803dd87cf53f","title":"How can future inception (`inception (P571)`) dates be excluded?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2023/12"}}
{"id":"train_138","question":"What are the current municipal districts, urban districts in Russia, or administrative districts of Moscow located within Perm Krai?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX schema: <http://schema.org/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?id WHERE { { ?id p:P31 / ps:P31 / wdt:P279 * wd:Q2198484 . } UNION { ?id p:P31 / ps:P31 / wdt:P279 * wd:Q13626398 . } UNION { ?id p:P31 / ps:P31 / wdt:P279 * wd:Q4057820 . } ?id p:P131 ?locst . ?locst ps:P131 / wdt:P131 * wd:Q5400 . MINUS { ?locst pq:P582 [] } OPTIONAL { ?link schema:about ?id . ?link schema:isPartOf <https://en.wikipedia.org/> . } } GROUP BY ?id ?link ?idLabel","paraphrases":[],"info":{"id":"1abbb6b69c835edde070bcbf0ab44af14de9e16b22c070b680613db0c530dfb0","title":"Optimizing a query for the mapframe extension","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/02"}}
{"id":"train_139","question":"What are the authors who are citizens of Norway, along with their dates of birth (if available) and works (if available)?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?author ?dob ?work WHERE { ?author wdt:P27 wd:Q20 . ?author wdt:P106 wd:Q482980 . OPTIONAL { ?author wdt:P569 ?dob } OPTIONAL { ?author ^ wdt:P50 ?work } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"df3d023a806ca158600beacaae8d01153bc83d36764e2758c67e34bde37478df","title":"Where do I do wrong things?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/08"}}
{"id":"train_140","question":"Who are citizens of Norway born before January 1, 1802 and died on or after January 1, 1802? For each person, if available, also include where they resided at.","sparql":"PREFIX p: <http://www.wikidata.org/prop/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?person ?residence WHERE { ?person wdt:P31 wd:Q5 . ?person wdt:P27 wd:Q20 . ?person wdt:P569 ?birth . ?person wdt:P570 ?death . OPTIONAL { ?person p:P551 ?residenceStatement . ?residenceStatement ps:P551 ?residence . } FILTER ( ?birth < \"1802-01-01\" ^^ xsd:dateTime && ?death >= \"1802-01-01\" ^^ xsd:dateTime ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"2ef3435761fdc54187c5af5567db5a874c45c0602998b8a92aeb9a9afbed1df8","title":"All norwegians born before 1802","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/01"}}
{"id":"train_141","question":"What are episodes of the eighth season of the Lego Ninjago TV series, Sons of Garmadon, including their series ordinal positions as integers (i.e. which episode in the season), if available, and ordered by that?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ( xsd:integer ( ?number ) AS ?no ) WHERE { ?item p:P4908 ?statement . ?statement ps:P4908 wd:Q43133862 . OPTIONAL { ?statement pq:P1545 ?number . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?no","paraphrases":[],"info":{"id":"038d518d36404e1117ac38e1687bf9b422486a4ea3ade5e3d6c521ba34e421f0","title":"show qualifier","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/09"}}
{"id":"train_142","question":"Who are the participants of the exhibition \"Estudiotik at. Five years of creation,\" and if available, their place of birth coordinates?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT distinct ?item ?coord WHERE { { wd:Q106591714 wdt:P710 ?item . } UNION { ?item wdt:P1344 wd:Q106591714 . } optional { ?item wdt:P19 / wdt:P625 ?coord . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"ca0bc6ae27669c2ec20a0c09d4ac8fe90df80f71545d542d19eb950bacd2d77b","title":"Crear mapa con una exposición","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/05"}}
{"id":"train_143","question":"What are the names, dates of birth (if available), and dates of death (if available) of individuals who have works in the City of Pori art collection?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?date_of_birth ?date_of_death WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P6379 wd:Q86443703 . OPTIONAL { ?item wdt:P569 ?date_of_birth . } OPTIONAL { ?item wdt:P570 ?date_of_death . } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"05fd33c6389b6734c16c91c5c8319865e18e0ee7cf8077a6c7844462634b2452","title":"List of artists in City of Pori art collection","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/03"}}
{"id":"train_144","question":"Who are the co-authors of Thomas Shafee? Return a list of tuples, where each tuple contains a pair of authors who have coauthored with Thomas Shafee on the same work, and a label of either \"male\" or \"other\" depending on whether the author is a male or not, for the first author in the triple","sparql":"\n# Egocentric co-author graph for an author\nSELECT ?author1 ?author1Label ?rgb ?author2 ?author2Label\nWITH {\n  SELECT (COUNT(?work) AS ?count) ?author1 ?author2 WHERE {\n    # Find co-authors\n    ?work wdt:P50 wd:Q38382414, ?author1, ?author2 .\n\n  }\n  GROUP BY ?author1 ?author2\n  ORDER BY DESC(?count)\n} AS %authors\nWITH {\n  SELECT ?author1 ?author2 ?rgb WHERE {\n    INCLUDE %authors\n    \n    # Exclude self-links\n    FILTER (?author1 != ?author2)\n    \n    # Color according to gender\n    OPTIONAL {\n      ?author1 wdt:P21 ?gender1 . \n      BIND( IF(?gender1 = wd:Q6581097, \"male\", \"other\") AS ?rgb)\n    }\n  }\n} AS %result\nWHERE {\n  INCLUDE %result\n  # Label the results \n  SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,fr,de,ru,es,zh,jp\". }\n}","paraphrases":[],"info":{"id":"171b91973efaedd35528343e901a9479ab076571f6be57a2ef5478073ffd640f","title":"Clash between COUNT and SERVICE wikibase:label ?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/04"}}
{"id":"train_145","question":"What are the political offices held by the heads of governmen for each region in Paphos District in the Republic of Cyprus?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?authority WHERE { ?authority wdt:P131 wd:Q59133 . ?authority wdt:P1313 ?item . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by desc ( ?itemLabel )","paraphrases":[],"info":{"id":"349879d94826fae886dada3747baced0693f22d20835bec4a4f184da49437860","title":"office held by head of government","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/01"}}
{"id":"train_146","question":"What are the paintings whose Iconclass.org notation starting with \"71A\", along with their Iconclass notation values, and, if available, the corresponding entities that have the same Iconclass notation?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?itemLabel ?value ?is ?isLabel WHERE { ?item wdt:P31 wd:Q3305213 ; wdt:P1257 ?value . FILTER ( regex ( ?value , \"^71A.*$\" ) ) OPTIONAL { ?is wdt:P1256 ?value } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"f704547d371c32a4a0d687a6d3a56f1cf16d161c60b506f524cffb17baf389af","title":"Wildcard characters in wdqs/sparql ?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/08"}}
{"id":"train_147","question":"What are the occupations of people who were born in Utah? For each tuple include the person and their occupation.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?person ?personLabel ?occupation WHERE { { ?person wdt:P19 wd:Q829 . } UNION { ?person wdt:P19 ?placeofbirth . ?placeofbirth wdt:P131 + wd:Q829 . } ?person wdt:P106 ?occupation . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"9eeb1116f509496327abcfc4d775bc05d1d3036c618fc0c6c9616beeed01ec2e","title":"Occupations of people born in Utah","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/09"}}
{"id":"train_148","question":"What are the 40 western-most towns or cities located in Alabama, and what are their longitudes and coordinates?","sparql":"PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item ?long ?coords WHERE { VALUES ?town_city { wd:Q3957 wd:Q515 } . ?item wdt:P31 / wdt:P279 * ?town_city . ?item wdt:P131 * wd:Q173 . ?item p:P625 / psv:P625 / wikibase:geoLongitude ?long . ?item wdt:P625 ?coords SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } ORDER BY ?long LIMIT 40","paraphrases":[],"info":{"id":"6efb4386a45888174b8606de121ade32c9e79f91da4bac8bac31defdcd6fed42","title":"Most western city or town in Alabama?","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/05"}}
{"id":"train_149","question":"What are the taxons of remarkable trees? For each taxon, also return its taxon rank  and count how many common names it has.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?taxon ?rank ( COUNT ( ?commonname ) as ?commonnamecount ) WHERE { { SELECT ?taxon WHERE { ?item wdt:P31 wd:Q811534 ; wdt:P31 ?taxon } GROUP BY ?taxon } ?taxon wdt:P105 ?rank . OPTIONAL { ?taxon wdt:P1843 ?commonname . FILTER ( lang ( ?commonname ) = \"[AUTO_LANGUAGE]\" ) } SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en,fr,cs,pl\" } } GROUP BY ?taxon ?rank","paraphrases":[],"info":{"id":"d21ffec738fbc60df840f74c67cb35bb662271e9f60954d244e61ce46dc28ff7","title":"Query all taxons which are trees","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/08"}}
{"id":"train_150","question":"Who are politicians that are citizens of the United States and have either parent or mother being also a politican?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q5 ; wdt:P27 wd:Q30 ; wdt:P106 wd:Q82955 . { ?item wdt:P22 ?father . ?father wdt:P106 wd:Q82955 . } UNION { ?item wdt:P25 ?mother . ?mother wdt:P106 wd:Q82955 . } }","paraphrases":[],"info":{"id":"aa9edca8c855f3f66cfad4f47d7b1fbc079d521ae7c915b5b9d9411c828c9cad","title":"I'm trying to write a query to find American politicians whose father or mother was also a politician","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/08"}}
{"id":"train_151","question":"What are the cities with a population of at least one million people?","sparql":"PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT DISTINCT ?city WHERE { ?city wdt:P31 / wdt:P279 * wd:Q515 . ?city wdt:P1082 ?population . FILTER ( ?population >= 1000000 ) . }","paraphrases":[],"info":{"id":"f4c5c2ca5b0b15861980c2024da73f09a1e1f9aba452f81a2130092af660c67f","title":"Names of all cities around the world with a population larger than one million","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/11"}}
{"id":"train_152","question":"What are the Australian aerodrome and total number of passengers for the year 2016 (as opposed to just the number for Australian or rest of the world passengers ), ordered by the number of passengers in descending order?","sparql":"PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?number WHERE { ?item wdt:P31 / wdt:P279 * wd:Q62447 . ?item wdt:P17 wd:Q408 . ?item p:P3872 ?statement . ?statement pq:P585 ?time . ?statement pq:P518 ?applies_to . ?statement ps:P3872 ?number . filter ( year ( ?time ) = 2016 ) filter ( ?applies_to = wd:Q2165236 ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } } order by desc ( ?number )","paraphrases":[],"info":{"id":"3d04f90a819a5ca63db183793c434e8c25ddc657d81881f1e607f5e9d30d4487","title":"Patronage of an Australian airport","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/12"}}
{"id":"train_153","question":"What are the counts of Byzantinists by their country of citizenship, categorized by gender (male, female, or other)? In other words, for each country, return how many byzantinists are male, female, and other.","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?nLabel ( COUNT ( ?male_ ) AS ?male ) ( COUNT ( ?female_ ) AS ?female ) ( COUNT ( ?other_ ) AS ?other ) WHERE { ?item wdt:P106 wd:Q26132815 ; wdt:P27 ?n ; wdt:P21 ?g . bind ( coalesce ( IF ( ?g = wd:Q6581097 , 1 , 1 / 0 ) ) as ?male_ ) bind ( coalesce ( IF ( ?g = wd:Q6581072 , 1 , 1 / 0 ) ) as ?female_ ) bind ( coalesce ( IF ( ?g not in ( wd:Q6581097 , wd:Q6581072 ) , 1 , 1 / 0 ) ) as ?other_ ) SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE]\" . } } GROUP BY ?nLabel ORDER BY ?nLabel","paraphrases":[],"info":{"id":"965f82f908847da0bda4aaf1f04da4db6f860a6809e5487bac207f4316971f83","title":"Cross two variables in a table","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2024/04"}}
{"id":"train_154","question":"For each state in Mexico, who is its current state governoer?","sparql":"PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?item ?state WHERE { ?wiki_items p:P1308 ?statement . ?wiki_items wdt:P279 wd:Q17810142 . ?statement ps:P1308 ?item . ?wiki_items p:P1001 ?other_statement . ?other_statement ps:P1001 ?state . SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\" . } }","paraphrases":[],"info":{"id":"6f30d4f1a9e496994364566a3345dfd7d53d81560a2494db0b707dd3e5f3f48e","title":"Help simplifying query: Request all officeholders (p:`officeholder (P1308)`) and applies to jurisdiction (p:`applies to jurisdiction (P1001)`) of governors of a mexican state (wdt:`state governor of Mexico (Q17810142)`)","url":"https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2024/05"}}
