Question: What is the English label of the Wikidata property "has part"?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label WHERE {
  wd:P527 rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}

How is the property P527 labeled in English?

What is the human-readable name of the "has part" property in Wikidata?

SELECT ?var1Label ?var2 WHERE { <http://www.wikidata.org/prop/direct/P58> ?var2 ?var1Label . }


Question: What are the broader categories or parent classes of the position "Member of the People's National Assembly of Algeria"?

SELECT DISTINCT ?superclass ?superclassLabel WHERE { wd:Q21290886 wdt:P279* ?superclass . FILTER(?superclass != wd:Q21290886) . OPTIONAL { ?superclass rdfs:label ?superclassLabel . FILTER(LANG(?superclassLabel) = 'en') } } LIMIT 10

What types of positions is a Member of the People's National Assembly of Algeria a subclass of?

Show me all the higher-level classifications (like legislator, elective office, etc.) that include the role of a Member of the People's National Assembly of Algeria.

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q21290886> AS ?var2 ). ?var2 <http://www.wikidata.org/prop/direct/P279> * ?var1 . }


Question: People who are members of the House of Representatives of Antigua and Barbuda.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?person WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person wdt:P39 ?position .
  ?position wdt:P279 * wd:Q21290853 .
}
LIMIT 500

Who are the humans holding the position of Member of the House of Representatives of Antigua and Barbuda or any of its subclasses?

List all individuals who have served in the House of Representatives of Antigua and Barbuda.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var1 <http://www.wikidata.org/prop/direct/P39> ?var2 . ?var2 ( <http://www.wikidata.org/prop/direct/P279> | <http://www.wikidata.org/prop/direct/P131> )* <http://www.wikidata.org/entity/Q21290853> . } LIMIT 500


Question: Top countries by number of athletes representing them in sports, with Russian labels.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?country ?labelRu ?count WHERE {
  {
    SELECT ?country ( COUNT( * ) AS ?count ) WHERE {
      ?athlete wdt:P1532 ?country .
    }
    GROUP BY ?country
  }
  OPTIONAL {
    ?country rdfs:label ?labelRu .
    FILTER ( LANG( ?labelRu ) = "ru" ) .
  }
}
ORDER BY DESC ( ?count ) ASC ( ?labelRu )
LIMIT 1000

Which countries have the most athletes representing them in sports, and what are their Russian names?

Show me the 1000 countries most frequently listed as sporting nationalities in Wikidata, ordered by how many athletes represent them, along with their Russian labels.

SELECT ?var1 ?var2 ?var3 WHERE { { SELECT ?var1 ( COUNT (* ) AS ?var3 ) WHERE { ?var4 <http://www.wikidata.org/prop/direct/P1532> ?var1 . } GROUP BY ?var1 } OPTIONAL { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "ru" ) ) ) . } } ORDER BY DESC( ?var3 )ASC( ?var2 ) LIMIT 1000


Question: German names of countries used in Wikidata as P17 values

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?country ?countryLabel WHERE {
  ?item wdt:P17 ?country .
  ?country rdfs:label ?countryLabel .
  FILTER ( LANG( ?countryLabel ) = "de" )
}
LIMIT 100

What are the German-language names of countries that appear as the sovereign state in Wikidata entries?

List up to 100 countries in German from Wikidata that are used as the sovereign state for other entities.

SELECT ?var1 ?var2Label ?var3 WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". { SELECT DISTINCT ?var1 WHERE { ?var4 <http://www.wikidata.org/prop/direct/P17> ?var1 . } LIMIT 100 } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var1 <http://schema.org/description> ?var3 . FILTER ( ( ( LANG ( ?var2Label ) = "de" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "de" ) ) ) . } LIMIT 100


Question: List archaeological sites, dams, and landmarks in southern Europe between 6°E and 11°E longitude and 37°N and 41°N latitude, along with their images and Wikimedia Commons categories.

SELECT ?item ?itemLabel ?coord ?image ?commonsCategory WHERE { ?item wdt:P625 ?coord . BIND(STRBEFORE(STR(?coord), " ") AS ?lonStr) BIND(STRAFTER(?lonStr, "POINT(") AS ?lon) BIND(STRBEFORE(STRAFTER(STR(?coord), " "), ")") AS ?lat) BIND(xsd:double(?lon) AS ?lonNum) BIND(xsd:double(?lat) AS ?latNum) FILTER(?lonNum >= 6 && ?lonNum <= 11 && ?latNum >= 37 && ?latNum <= 41) OPTIONAL { ?item wdt:P18 ?image . } OPTIONAL { ?item wdt:P373 ?commonsCategory . } ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") } LIMIT 3000

What are the geographic locations (with coordinates, images, and Commons categories) of cultural and historical sites located in the region bounded by 6°E–11°E and 37°N–41°N?

Show me all entities in the Mediterranean region (between 6–11°E and 37–41°N) that have coordinates, and include any associated images or Wikimedia Commons categories if available.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { SERVICE <http://wikiba.se/ontology#box> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerSouthWest> "POINT(6 37)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(11 41)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P373> ?var6 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "string1". ?var1 <http://schema.org/description> ?var5 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . } } LIMIT 3000


Question: Family names without Albanian descriptions and their labels

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?var1 ?var1Label WHERE {
  ?var1 wdt:P31 wd:Q101352 .
  FILTER(NOT EXISTS {
    ?var1 schema:description ?var3 .
    FILTER(LANG(?var3) = "sq")
  })
  ?var1 rdfs:label ?var1Label .
}
LIMIT 2000

What are the family names that don't have a description in Albanian?

List the labels of all family names that are not described in Albanian.

SELECT ?var1 ?var1Label ?var2 WHERE { { SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q101352> . FILTER ( ( NOT EXISTS { ?var1 <http://schema.org/description> ?var3 . FILTER ( ( ( LANG ( ?var3 ) = "sq" ) ) ) . } ) ) . } LIMIT 2000 } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sq". } }


Question: What are all the superclass categories of hypothetical scientific object?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?superclass WHERE {
  wd:Q30126005 wdt:P279 * ?superclass .
}

What classes does 'hypothetical scientific object' belong to, including its ancestors in the subclass hierarchy?

List all the broader categories that include 'hypothetical scientific object', going up the classification tree.

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q30126005> AS ?var2 ). ?var2 <http://www.wikidata.org/prop/direct/P279> * ?var1 . }


Question: Registration districts in Sweden with their coordinates and corresponding municipalities.

SELECT ?district ?districtLabel ?coordinates ?municipalityLabel WHERE { ?district wdt:P31 wd:Q18333556 . OPTIONAL { ?district wdt:P625 ?coordinates . } ?district wdt:P131 ?municipality . ?municipality wdt:P31 wd:Q127448 . ?district rdfs:label ?districtLabel . ?municipality rdfs:label ?municipalityLabel . FILTER(LANG(?districtLabel) = "en") FILTER(LANG(?municipalityLabel) = "en") }

What are the registration districts in Sweden, their geographic coordinates, and the municipalities they belong to?

List all registration districts in Sweden along with their coordinates and the names of the municipalities they are located in, in English.

SELECT ?var1 ?var1Label ?var2 ( ?var3Label AS ?var4 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q18333556> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . } { ?var1 <http://www.wikidata.org/prop/direct/P131> ?var3 . } { ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q127448> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv". } }


Question: What are the occupations of Douglas Adams?

SELECT ?label ?occupation WHERE { wd:Q42 rdfs:label ?label . FILTER(LANG(?label) = "en") . wd:Q42 wdt:P106 ?occupation . }

Who is Douglas Adams and what does he do for a living?

List the professions associated with the author of The Hitchhiker’s Guide to the Galaxy.

SELECT ?var1 WHERE { { BIND ( <http://www.wikidata.org/entity/Q42> AS ?var2 ). } }


Question: What are the different types of human names (anthroponyms) listed in Wikidata?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?subclass ?label WHERE {
  ?subclass wdt:P279 * wd:Q10856962 .
  FILTER(?subclass != wd:Q10856962)
  .
  ?subclass rdfs:label ?label .
  FILTER(LANG(?label) = 'en')
}

Can you list all subclasses of anthroponym, such as family names or given names, in English?

Show me all named categories of personal names, like surnames or nicknames, that are classified under anthroponym in Wikidata.

SELECT ?var1 ?var2 WHERE { VALUES ( ?var3 ) { ( <http://www.wikidata.org/entity/Q10856962> ) } ?var1 <http://www.wikidata.org/prop/direct/P279> * ?var3 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P279> ?var2 . } }


Question: Taxonomic descendants of angiosperms with "topinambur" in their name

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?var1 ?var2Label WHERE {
  ?var1 wdt:P171 + wd:Q25314 .
  {
    ?var1 rdfs:label ?var2Label .
  } UNION {
    ?var1 skos:altLabel ?var2Label .
  }
  FILTER ( CONTAINS( LCASE( STR( ?var2Label ) ) , "topinambur" ) )
}

Which flowering plant species are known as topinambur?

Show me all plant taxa under angiosperms that have "topinambur" as a common name or synonym.

SELECT ?var1 ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P171> + <http://www.wikidata.org/entity/Q25314> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . FILTER ( ( CONTAINS ( LCASE ( STR ( ?var2Label ) ) , "topinambur" ) ) ) . }


Question: Leonardo DiCaprio movies and TV shows

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?actorLabel ?productionLabel WHERE {
  ?actor wdt:P646 "/m/0dvmd" .
  ?production wdt:P161 ?actor .
  ?actor rdfs:label ?actorLabel .
  ?production rdfs:label ?productionLabel .
  FILTER ( LANG( ?actorLabel ) = "en" ) .
  FILTER ( LANG( ?productionLabel ) = "en" ) .
}

Which films and TV series has Leonardo DiCaprio acted in?

List all the productions in which Leonardo DiCaprio appeared as a cast member.

SELECT ?var1Label ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P646> "/m/0dvmd". ?var2 <http://www.wikidata.org/prop/direct/P161> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } LIMIT 200


Question: List literary works that won the Euskadi Award, along with their authors, award year, and publication year.

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?work ?author ?awardYear ?workLabel ?publicationYear WHERE {
  ?work wdt:P31 wd:Q7725634 .
  ?work p:P166 ?awardStatement .
  ?awardStatement ps:P166 wd:Q33100743 .
  ?awardStatement pq:P585 ?awardDate .
  BIND(YEAR(?awardDate) AS ?awardYear)
  OPTIONAL {
    ?work wdt:P50 ?author .
  }
  OPTIONAL {
    ?work wdt:P577 ?publicationDate .
  }
  BIND(YEAR(?publicationDate) AS ?publicationYear)
  OPTIONAL {
    ?work rdfs:label ?workLabel .
    FILTER(LANG(?workLabel) = "en")
  }
}
ORDER BY DESC(?awardYear)
LIMIT 50

Which books received the Euskadi Award for Basque-language literature, who wrote them, and when were they published and awarded?

Show me the titles of literary works that won the Euskadi Award, their authors, the year they received the award, and their publication year, sorted by most recent award first.

SELECT DISTINCT ?var1 ?var2 ?var3 ?var4 ?var1Label ?var5Label ?var6 WHERE { { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q17537576> . } UNION { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q571> . } ?var1 <http://www.wikidata.org/prop/P166> ?var7 . ?var7 <http://www.wikidata.org/prop/statement/P166> <http://www.wikidata.org/entity/Q33100743> . ?var7 <http://www.wikidata.org/prop/qualifier/P585> ?var8 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P50> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P123> ?var5 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P577> ?var9 . } OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var4 . } BIND ( YEAR ( ?var8 ) AS ?var3 ). BIND ( YEAR ( ?var9 ) AS ?var6 ). SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "eu,eu, fr, en, es". } }


Question: What are all the properties and values associated with Steven Spielberg's Freebase ID /m/06pj8?

SELECT ?property ?value WHERE { ?entity wdt:P646 "/m/06pj8" . ?entity ?property ?value . FILTER(STRSTARTS(STR(?property), "http://www.wikidata.org/prop/direct/")) }

What information does Wikidata have about the person with Freebase ID /m/06pj8?

List all direct claims (properties and values) for the entity identified by the Freebase ID /m/06pj8.

SELECT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P646> "/m/06pj8". ?var3 <http://wikiba.se/ontology#directClaim> ?var4 . ?var2 ?var4 ?var5 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What is the English label of the entity with Freebase ID /m/06pj8?

SELECT ?item ?label WHERE { ?item wdt:P646 "/m/06pj8" . ?item rdfs:label ?label FILTER(LANG(?label) = "en") }

Who is the person identified by the Freebase ID /m/06pj8?

Return the English name of the person whose Freebase identifier is /m/06pj8.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P646> "/m/06pj8". ?var1 <http://wikiba.se/ontology#Property> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What type of entity is Steven Spielberg in Wikidata?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
SELECT ?type WHERE {
  wd:Q8877 a ?type .
  FILTER(?type IN(wikibase:Item , wikibase:Property))
}

Is Steven Spielberg classified as an item or a property in Wikidata?

What is the RDF type of the Wikidata item Q8877?

SELECT ?var1 WHERE { <http://www.wikidata.org/prop/direct/Q8877> <http://wikiba.se/ontology#type> ?var1 . }


Question: French churches labeled "Eglise" with their Mérimée ID and heritage designation.

SELECT ?church ?merimeeId ?heritageDesignation WHERE { ?church rdfs:label ?label . FILTER(LANG(?label) = 'fr') . FILTER(CONTAINS(LCASE(?label), 'eglise')) . OPTIONAL { ?church wdt:P380 ?merimeeId . } OPTIONAL { ?church wdt:P1435 ?heritageDesignation . } }

What are the Mérimée IDs and heritage designations of churches in France labeled "Eglise" in French?

Show me the French churches named "Eglise" along with their Mérimée identifiers and heritage status.

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 ?var4Label "Eglise". OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P380> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1435> ?var3 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr". } }


Question: Can you list 10 humans from Wikidata?

SELECT ?item WHERE { ?item wdt:P31 wd:Q5 . } LIMIT 10

What are some examples of people in Wikidata?

Show me 10 entities classified as human in Wikidata.

SELECT * WHERE { ?var1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . } LIMIT 10


Question: People employed by companies listed on the Frankfurt Stock Exchange and their universities.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?person ?personLabel ?employerLabel ?almaMaterLabel WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person wdt:P108 ?employer .
  ?employer wdt:P414 wd:Q151139 .
  OPTIONAL {
    ?person wdt:P69 ?almaMater .
    ?almaMater rdfs:label ?almaMaterLabel .
    FILTER(LANG(?almaMaterLabel) = "en")
  }
  ?person rdfs:label ?personLabel .
  ?employer rdfs:label ?employerLabel .
  FILTER(LANG(?personLabel) = "en")
  FILTER(LANG(?employerLabel) = "en")
}

Who are the individuals working for companies traded on the Frankfurt Stock Exchange, and where did they study?

List the names of people employed by Frankfurt Stock Exchange-listed firms along with their educational backgrounds, if available.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var1 <http://www.wikidata.org/prop/direct/P108> ?var2 . ?var2 <http://www.wikidata.org/prop/direct/P414> <http://www.wikidata.org/entity/Q151139> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de,en". } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P69> ?var3 . } }


Question: Top 50 most common occupations without Latvian labels, ranked by number of people.

SELECT ?occupation ?occupationLabel ?count WHERE { { SELECT ?occupation (COUNT(?person) AS ?count) WHERE { ?person wdt:P106 ?occupation . } GROUP BY ?occupation ORDER BY DESC(?count) LIMIT 1000 } ?occupation rdfs:label ?occupationLabel . FILTER(LANG(?occupationLabel) = "en") MINUS { ?occupation rdfs:label ?latvianLabel . FILTER(LANG(?latvianLabel) = "lv") } } ORDER BY DESC(?count) LIMIT 50

What are the 50 most popular occupations in Wikidata that don’t have a Latvian label, and how many people have each?

Show me the top 50 occupations by number of people, excluding any that have a Latvian label, and display their English names.

SELECT ?var1 ?var1Label ?var2 WHERE { { SELECT ?var1 ( COUNT ( ?var3 ) AS ?var2 ) WHERE { ?var3 <http://www.wikidata.org/prop/direct/P106> ?var1 . } GROUP BY ?var1 ORDER BY DESC( ?var2 ) LIMIT 1000 } OPTIONAL { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var4 . FILTER ( ( ( LANG ( ?var4 ) = "lv" ) ) ) . } FILTER ( ( !( BOUND ( ?var4 ) ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,es,pl,ja,zh,ru". } } ORDER BY DESC( ?var2 ) LIMIT 50


Question: What are the English Wikipedia pages and images for some countries?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?country ?countryLabel ?wikipediaPage ( SAMPLE( ?image ) AS ?flagImage ) WHERE {
  ?country wdt:P31 wd:Q6256 .
  OPTIONAL {
    ?country wdt:P18 ?image .
  }
  OPTIONAL {
    ?wikipediaPage schema:about ?country ; schema:isPartOf <https://en.wikipedia.org/> .
  }
  ?country rdfs:label ?countryLabel .
  FILTER ( LANG( ?countryLabel ) = "en" )
}
GROUP BY ?country ?countryLabel ?wikipediaPage
LIMIT 4

Can you show me a few countries along with their official names, English Wikipedia links, and associated images like flags or maps?

List four countries with their labels in English, their corresponding English Wikipedia articles, and one representative image from Wikimedia Commons.

SELECT DISTINCT ?var1 ?var2 ( SAMPLE ( ?var3 ) AS ?var3 ) ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q6256> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { ?var4 <http://schema.org/about> ?var1 . ?var4 <http://schema.org/isPartOf> <https://en.wikipedia.org/> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en,fr,es,de,ru,it,nl,ja,zh,pl,cs". } } GROUP BY ?var1 ?var1Label ?var2 ?var4 LIMIT 4


Question: Cities with population, area, coordinates, country, image, and elevation, sorted by highest population.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?city ?cityLabel ?population ?area ?coordinates ?countryLabel ?image ?elevation WHERE {
  ?city(wdt:P31 / wdt:P279 *) wd:Q515 .
  ?city wdt:P1082 ?population .
  ?city wdt:P2046 ?area .
  ?city wdt:P625 ?coordinates .
  ?city wdt:P17 ?country .
  ?city wdt:P18 ?image .
  ?city wdt:P2044 ?elevation .
  ?city rdfs:label ?cityLabel .
  ?country rdfs:label ?countryLabel .
  FILTER(LANG(?cityLabel) = "en")
  FILTER(LANG(?countryLabel) = "en")
}
ORDER BY DESC(?population)

What are the largest cities in the world by population, along with their area, coordinates, country, image, and elevation?

Show me a list of all cities, including their population, area, geographic coordinates, country, an image, and elevation, ordered from the most populous to the least.

SELECT ?var1 ?var1Label ( SAMPLE ( ?var2 ) AS ?var2 )( SAMPLE ( ?var3 ) AS ?var3 )( SAMPLE ( ?var4 ) AS ?var4 ) ?var5Label ( SAMPLE ( ?var6 ) AS ?var6 )( SAMPLE ( ?var7 ) AS ?var7 ) WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q515> . ?var1 <http://www.wikidata.org/prop/direct/P1082> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P2046> ?var3 . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P17> ?var5 . ?var1 <http://www.wikidata.org/prop/direct/P18> ?var6 . ?var1 <http://www.wikidata.org/prop/direct/P2044> ?var7 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var1Label ?var5Label ORDER BY DESC( ?var2 )


Question: What are all the taxonomic ranks above Coenosia tendipes?

SELECT DISTINCT ?taxon WHERE { wd:Q13495341 wdt:P171* ?taxon }

What is the complete taxonomic hierarchy of the insect species Coenosia tendipes?

Show me the full lineage of parent taxa for Coenosia tendipes, from species up to kingdom.

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q13495341> AS ?var2 ). ?var2 ( <http://www.wikidata.org/prop/direct/P171> | <http://www.wikidata.org/prop/direct/P273> | <http://www.wikidata.org/prop/direct/P75> | <http://www.wikidata.org/prop/direct/P76> | <http://www.wikidata.org/prop/direct/P77> | <http://www.wikidata.org/prop/direct/P70> | <http://www.wikidata.org/prop/direct/P71> | <http://www.wikidata.org/prop/direct/P74> | <http://www.wikidata.org/prop/direct/P89> )* ?var1 . }


Question: What are the journals and publications where Charles Darwin published the most works, and how many did he publish in each?

SELECT ?publication ?displayLabel (COUNT(?work) AS ?count)
WHERE {
  ?work wdt:P50 wd:Q1035 .
  ?work wdt:P1433 ?publication .
  ?publication rdfs:label ?publicationLabel .
  OPTIONAL {
    ?publication wdt:P1813 ?shortName .
  }
  BIND( COALESCE(?shortName, ?publicationLabel) AS ?displayLabel )
  FILTER( LANG(?displayLabel) = "" || STRSTARTS(LANG(?displayLabel), "en") )
}
GROUP BY ?publication ?displayLabel
ORDER BY DESC(?count)

Which journals have published the most papers by Charles Darwin, showing their common abbreviations when available?

List Charles Darwin’s publication venues in English, using abbreviated titles where they exist, sorted by the number of works he published in each.

SELECT ?var1 ?var2Label ( COUNT ( ?var3 ) AS ?var4 ) WHERE { ?var3 <http://www.wikidata.org/prop/direct/P50> <http://www.wikidata.org/entity/Q1035> . ?var3 <http://www.wikidata.org/prop/direct/P1433> ?var1 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var5Label . FILTER ( ( ( LANG ( ?var5Label ) = "en" ) ) ) . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1813> ?var6 . } BIND ( COALESCE ( ?var6 , ?var5Label ) AS ?var2Label ). } GROUP BY ?var1 ?var2Label ORDER BY DESC( ?var4 )


Question: Countries with their names and flag or map images

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 ?country ?label ?image WHERE {
  ?country wdt:P31 wd:Q6256 .
  OPTIONAL {
    ?country wdt:P18 ?image .
  }
  ?country rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}
ORDER BY ASC ( ?label )
LIMIT 2

What are the first two countries in alphabetical order, along with their English names and associated images?

Show me two countries, their English labels, and any available images like flags or maps, sorted alphabetically by name.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q6256> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { ?var4 <http://schema.org/about> ?var1 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en,fr,es,de,ru,it,nl,ja,zh,pl,cs". } } GROUP BY ?var1 ?var1Label ?var2 ?var4 ORDER BY ASC( ?var1Label ) LIMIT 2


Question: What are the properties and their values associated with the filmmaker Dziga Vertov, along with their English labels?

SELECT DISTINCT ?property ?propertyLabel ?value ?valueLabel WHERE { wd:Q55193 ?property ?value . ?propertyItem wikibase:directClaim ?property . ?propertyItem rdfs:label ?propertyLabel . FILTER(LANG(?propertyLabel) = "en") . OPTIONAL { ?value rdfs:label ?valueLabel . FILTER(LANG(?valueLabel) = "en") } }

Can you list the English labels of all properties used for Dziga Vertov in Wikidata, and what values they have, including labels for those values if available?

Show me all the information about Dziga Vertov’s attributes in Wikidata, including property names and their meanings in English, and the labels of the values where they are entities.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label WHERE { <http://www.wikidata.org/entity/Q55193> ?var3 ?var2 . ?var1 <http://wikiba.se/ontology#directClaim> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } }


Question: Scholarly articles with "brain stem" in the title that are not primarily about brain stem.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item ?title WHERE {
  ?item wdt:P31 wd:Q13442814 ; wdt:P1476 ?title .
  FILTER ( CONTAINS( LCASE( ?title ) , "brain stem" ) ) .
  FILTER ( LANG( ?title ) = "en" ) . MINUS {
    ?item wdt:P921 wd:Q182228 .
  }
}
LIMIT 10

What are English-language scholarly articles that mention "brain stem" in the title but do not have brain stem as their main subject?

Show me scholarly articles about brain stem-related topics (like diseases or imaging) where the brain stem is not the central focus, with titles in English.

SELECT DISTINCT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q13442814> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . MINUS { ?var1 <http://www.wikidata.org/prop/direct/P921> <http://www.wikidata.org/entity/Q182228> . } FILTER ( ( CONTAINS ( LCASE ( ?var1Label ) , "brain stem" ) ) ) . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . }


Question: What pairs of scientific topics are commonly discussed together in research works about Purkinje cells?

SELECT DISTINCT ?topic1 ?topic1Label ?topic2 ?topic2Label WHERE { ?work wdt:P921 wd:Q1570272 . ?work wdt:P921 ?topic1 , ?topic2 . FILTER ( ?topic1 != wd:Q1570272 && ?topic2 != wd:Q1570272 && ?topic1 != ?topic2 ) OPTIONAL { ?topic1 rdfs:label ?topic1Label . FILTER(LANG(?topic1Label) = "en") } OPTIONAL { ?topic2 rdfs:label ?topic2Label . FILTER(LANG(?topic2Label) = "en") } }

Co-occurring topics with Purkinje cells in academic works

Show me other research topics that appear alongside Purkinje cells in the main subjects of scientific publications.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label WHERE { { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P31> */ <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q1570272> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P361> +) <http://www.wikidata.org/entity/Q1570272> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P1269> +) <http://www.wikidata.org/entity/Q1570272> . } ?var3 <http://www.wikidata.org/prop/direct/P921> ?var1 , ?var2 . FILTER ( ( ( <http://www.wikidata.org/entity/Q1570272> != ?var1 ) && ( <http://www.wikidata.org/entity/Q1570272> != ?var2 ) && ( ?var1 != ?var2 ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: What is the French word for "church" in Wikidata's lexeme data?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
SELECT ?lexeme ?lexemeLabel WHERE {
  ?lexeme wikibase:lemma "église" @fr .
  ?lexeme rdfs:label ?lexemeLabel .
}

Which lexeme in Wikidata has the French lemma "église"?

Show the French word "église" as stored in Wikidata's lexical entries.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 ?var3Label "église"@fr . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr". } }


Question: Mountains and their first ascent dates

SELECT ?mountain ?event ?date WHERE { ?mountain wdt:P31 wd:Q8502 . ?mountain p:P793 ?statement . ?statement ps:P793 ?event ; pq:P585 ?date . }

Which mountains have recorded first ascents, and when did they occur?

List all mountains along with the significant events associated with them and the dates those events happened.

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q8502> . { ?var1 <http://www.wikidata.org/prop/P793> ?var4 . ?var4 <http://www.wikidata.org/prop/statement/P793> ?var2 ; <http://www.wikidata.org/prop/qualifier/P585> ?var3 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } }


Question: What are the different language names for Gabon, as the country of citizenship of Henri-Joseph Koumba Bididi?

SELECT ?countryLabel WHERE { wd:Q100166666 wdt:P27 ?country . ?country rdfs:label ?countryLabel . } LIMIT 100

In how many languages is the country of citizenship of Henri-Joseph Koumba Bididi labeled, and what are those labels?

Show me all the language labels for the country where Henri-Joseph Koumba Bididi is a citizen.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P27> ?var3 . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . } LIMIT 100


Question: French-language descriptions or labels for "abbaye"

SELECT ?item ?label WHERE { { ?item rdfs:label "abbaye"@fr . BIND("abbaye"@fr AS ?label) } UNION { ?item schema:description "abbaye"@fr . BIND("abbaye"@fr AS ?label) } }

Which entities are described as "abbaye" in French on Wikidata?

Show me all items in Wikidata that have the French description or label "abbaye".

SELECT * WHERE { ?var1 ?var2Label "abbaye"@fr . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr". } }


Question: German descriptions of Wikimedia disambiguation pages

SELECT ?disambigPage ?description WHERE { ?disambigPage wdt:P31 wd:Q4167410 . ?disambigPage schema:description ?description . FILTER(LANG(?description) = "de") }

What are the German-language descriptions of disambiguation pages on Wikimedia?

Show me the German descriptions for all Wikimedia disambiguation pages.

SELECT * WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q4167410> . MINUS { ?var1 <http://schema.org/description> "string1"@de . } MINUS { ?var1 <http://schema.org/description> "string2"@de . } ?var1 <http://schema.org/description> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "de" ) ) ) . }


Question: People who were Members of Parliament and competed in the Summer or Winter Olympics.

SELECT DISTINCT ?person ?personLabel ?olympicsLabel WHERE { ?person wdt:P1344 ?olympics . ?olympics wdt:P31 ?olympicType . FILTER(?olympicType IN (wd:Q159821, wd:Q82414)) . ?person wdt:P39 ?position . ?position wdt:P279* wd:Q16707842 . ?person rdfs:label ?personLabel . ?olympics rdfs:label ?olympicsLabel . FILTER(LANG(?personLabel) = "en") . FILTER(LANG(?olympicsLabel) = "en") }

Which British MPs participated in the Olympic Games?

List the names of individuals who held a position in the UK Parliament and also took part in either the Summer or Winter Olympic Games.

SELECT DISTINCT ?var1 ?var1Label ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1344> ?var2 . { ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q159821> . } UNION { ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q82414> . } { ?var1 <http://www.wikidata.org/prop/direct/P39> [ <http://www.wikidata.org/prop/direct/P279> <http://www.wikidata.org/entity/Q16707842> ] . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P39> <http://www.wikidata.org/entity/Q16707842> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What geographic regions is the Greater Cumberland Regional Airport located in?

SELECT DISTINCT ?location WHERE { { wd:Q3913914 (wdt:P30|wdt:P17|wdt:P131) ?location . } UNION { wd:Q3913914 (wdt:P30|wdt:P17|wdt:P131)/ (wdt:P30|wdt:P17|wdt:P131) ?location . } UNION { wd:Q3913914 (wdt:P30|wdt:P17|wdt:P131)/ (wdt:P30|wdt:P17|wdt:P131)/ (wdt:P30|wdt:P17|wdt:P131) ?location . } }

Can you list the country, state, and continent associated with Greater Cumberland Regional Airport?

Starting from Greater Cumberland Regional Airport, what larger administrative and geographic areas does it belong to?

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q3913914> AS ?var2 ). ?var2 ( <http://www.wikidata.org/prop/direct/P30> | <http://www.wikidata.org/prop/direct/P17> | <http://www.wikidata.org/prop/direct/P131> | <http://www.wikidata.org/prop/direct/P376> | <http://www.wikidata.org/prop/direct/P501> )* ?var1 . }


Question: Entities linked to Barack Obama with English labels

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?var1 ?var1Label WHERE {
  wd:Q76 ?p ?var1 .
  FILTER(isIRI(?var1))
  FILTER(! REGEX(STR(?var1) , "^http://www.wikidata.org/entity/statement/"))
  ?var1 rdfs:label ?var1Label .
  FILTER(LANG(?var1Label) = "en")
}
ORDER BY ASC(?var1Label)

What are the entities (like places, organizations, events) associated with Barack Obama, and what are their names in English?

Show me all the labeled entities connected to Barack Obama, excluding internal statements and literals, sorted alphabetically.

SELECT DISTINCT ?var1 ?var1Label WHERE { <http://www.wikidata.org/entity/Q76> ?var2 ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( ?var1Label )


Question: List all entities from this set that are not disambiguation pages on Wikidata.

Which of the following are not disambiguation pages: Elf (Q225256), ELF (Q1217374), Elf (Q1113150), and 22 others?

Show me the real-world entities from this list, excluding any Wikidata disambiguation pages.

SELECT DISTINCT ?var1 WHERE { ?var1 ?var2 ?var3 . MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q4167410> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q17633526> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11266439> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q4167836> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q14204246> . } VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q30426265> ) ( <http://www.wikidata.org/entity/Q174396> ) ( <http://www.wikidata.org/entity/Q203904> ) ( <http://www.wikidata.org/entity/Q225256> ) ( <http://www.wikidata.org/entity/Q832250> ) ( <http://www.wikidata.org/entity/Q949879> ) ( <http://www.wikidata.org/entity/Q1277648> ) ( <http://www.wikidata.org/entity/Q1343830> ) ( <http://www.wikidata.org/entity/Q576883> ) ( <http://www.wikidata.org/entity/Q10725720> ) ( <http://www.wikidata.org/entity/Q1113150> ) ( <http://www.wikidata.org/entity/Q19964005> ) ( <http://www.wikidata.org/entity/Q3050815> ) ( <http://www.wikidata.org/entity/Q5422801> ) ( <http://www.wikidata.org/entity/Q29976878> ) ( <http://www.wikidata.org/entity/Q24787742> ) ( <http://www.wikidata.org/entity/Q29720676> ) ( <http://www.wikidata.org/entity/Q18031694> ) ( <http://www.wikidata.org/entity/Q5359852> ) ( <http://www.wikidata.org/entity/Q21447959> ) ( <http://www.wikidata.org/entity/Q17916973> ) ( <http://www.wikidata.org/entity/Q18327552> ) ( <http://www.wikidata.org/entity/Q1217374> ) ( <http://www.wikidata.org/entity/Q1328478> ) ( <http://www.wikidata.org/entity/Q1328503> ) } }


Question: Which of these biological and medical entities are not Wikimedia meta-pages like templates or project pages?

SELECT DISTINCT ?item WHERE {
  VALUES ?item {
    wd:Q156103   # gastroenteritis
    wd:Q411159   # famotidine
    wd:Q11057134 # Gastroptychia gabata
    wd:Q30946139 # Gastrotricha
    wd:Q9266160  # (unknown)
    wd:Q13640110 # (unknown)
    wd:Q5526861  # (unknown)
    wd:Q172941   # peptic ulcer disease
    wd:Q4867740  # Gastropoda
    wd:Q171141   # gastronomy
    wd:Q120569   # gastroenterology
    wd:Q190115   # Gastrotricha (duplicate?)
    wd:Q223591   # gastroesophageal reflux disease
    wd:Q739734   # human gut flora
    wd:Q147894   # Corydoras
    wd:Q723673   # gastrolith
    wd:Q2300099  # gastrointestinal system disease
    wd:Q1495657  # gastrointestinal bleeding
    wd:Q279324   # gastrointestinal perforation
    wd:Q1495674  # gastroschisis
    wd:Q2691035  # Horned marsupial frog
    wd:Q1008492  # Gastrotheca
    wd:Q1495661  # gastrointestinal stromal tumor
    wd:Q133278   # Gastrodia
    wd:Q523202   # Gastrophryne
  }
  FILTER NOT EXISTS {
    ?item wdt:P31 ?excludedType .
    VALUES ?excludedType {
      wd:Q4167410   # disambiguation page
      wd:Q17633526  # Wikinews article
      wd:Q11266439  # template
      wd:Q4167836   # category
      wd:Q14204246  # project page
    }
  }
}

List all the real-world items from this set of 25 Wikidata entities, excluding any that are Wikipedia templates, disambiguation pages, or project pages.

From the following list of entities including species like Gastrotheca and diseases like gastroenteritis, which ones are actual things in the world and not just Wikipedia pages?

SELECT DISTINCT ?var1 WHERE { ?var1 ?var2 ?var3 . MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q4167410> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q17633526> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11266439> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q4167836> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q14204246> . } VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q156103> ) ( <http://www.wikidata.org/entity/Q411159> ) ( <http://www.wikidata.org/entity/Q11057134> ) ( <http://www.wikidata.org/entity/Q30946139> ) ( <http://www.wikidata.org/entity/Q9266160> ) ( <http://www.wikidata.org/entity/Q13640110> ) ( <http://www.wikidata.org/entity/Q5526861> ) ( <http://www.wikidata.org/entity/Q172941> ) ( <http://www.wikidata.org/entity/Q4867740> ) ( <http://www.wikidata.org/entity/Q171141> ) ( <http://www.wikidata.org/entity/Q120569> ) ( <http://www.wikidata.org/entity/Q190115> ) ( <http://www.wikidata.org/entity/Q223591> ) ( <http://www.wikidata.org/entity/Q739734> ) ( <http://www.wikidata.org/entity/Q147894> ) ( <http://www.wikidata.org/entity/Q723673> ) ( <http://www.wikidata.org/entity/Q2300099> ) ( <http://www.wikidata.org/entity/Q1495657> ) ( <http://www.wikidata.org/entity/Q279324> ) ( <http://www.wikidata.org/entity/Q1495674> ) ( <http://www.wikidata.org/entity/Q2691035> ) ( <http://www.wikidata.org/entity/Q1008492> ) ( <http://www.wikidata.org/entity/Q1495661> ) ( <http://www.wikidata.org/entity/Q133278> ) ( <http://www.wikidata.org/entity/Q523202> ) } }


Question: What are the geographic coordinates, administrative division, and country of the city of Kaya, ensuring the country is still active?

SELECT DISTINCT ?city ?cityLabel ?adminLabel ?countryLabel ?lat ?long ?instanceLabel WHERE {
  BIND(wd:Q766464 AS ?city)

  ?city wdt:P31 ?instance ;
        p:P17 ?stmt1 ;
        p:P625 ?stmt2 .

  # Country
  ?stmt1 ps:P17 ?country .
  FILTER(NOT EXISTS { ?stmt1 pq:P582 ?end1 })

  # Coordinates
  ?stmt2 psv:P625 ?coordNode .
  ?coordNode wikibase:geoLatitude ?lat ;
             wikibase:geoLongitude ?long .

  # Administrative division (direct)
  ?city wdt:P131 ?admin .

  # Labels
  OPTIONAL { ?city rdfs:label ?cityLabel . FILTER(LANG(?cityLabel) = "en") }
  OPTIONAL { ?admin rdfs:label ?adminLabel . FILTER(LANG(?adminLabel) = "en") }
  OPTIONAL { ?country rdfs:label ?countryLabel . FILTER(LANG(?countryLabel) = "en") }
  OPTIONAL { ?instance rdfs:label ?instanceLabel . FILTER(LANG(?instanceLabel) = "en") }
}

Tell me about Kaya in Burkina Faso: where is it located administratively, what are its coordinates, and what type of place is it?

Show me the current country and location details of Kaya, excluding any outdated or dissolved administrative relationships.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3Label ?var4 ?var5 ?var6 ?var6Label WHERE { BIND ( <http://www.wikidata.org/entity/Q766464> AS ?var2 ). OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P150> ?var1 . ?var2 <http://www.wikidata.org/prop/direct/P131> * ?var1 . } ?var2 <http://www.wikidata.org/prop/direct/P31> ?var6 ; <http://www.wikidata.org/prop/P17> ?var7 ; <http://www.wikidata.org/prop/P625> ?var8 . ?var7 <http://www.wikidata.org/prop/statement/P17> ?var3 . FILTER ( ( NOT EXISTS { ?var3 <http://www.wikidata.org/prop/direct/P576> ?var9 . } ) ) . FILTER ( ( NOT EXISTS { ?var7 <http://www.wikidata.org/prop/qualifier/P582> ?var10 . } ) ) . ?var8 <http://www.wikidata.org/prop/statement/value/P625> ?var11 . ?var11 <http://wikiba.se/ontology#geoLatitude> ?var4 . ?var11 <http://wikiba.se/ontology#geoLongitude> ?var5 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What are the detailed statements about Julius Caesar’s spouses in Wikidata?

SELECT ?statement WHERE { wd:Q1048 p:P26 ?statement . }

Show me all the spouse relationships of Julius Caesar that include additional details like qualifiers or references.

List the statement identifiers for Julius Caesar’s marriages in Wikidata.

SELECT ?var1 WHERE { <https://www.wikidata.org/wiki/Q1048> <http://www.wikidata.org/prop/P26> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } }


Question: What diseases are caused by biological taxa, and what are their scientific names?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?taxon ?taxonName ?disease ?diseaseLabel WHERE {
  ?taxon wdt:P225 ?taxonName .
  ?taxon wdt:P31 wd:Q16521 .
  ?taxon wdt:P1542 ?disease .
  ?disease rdfs:label ?diseaseLabel .
  FILTER(LANG(?diseaseLabel) = "en")
}

Which pathogens (species or viruses) cause specific diseases, and what are the names of those diseases in English?

List the scientific names of pathogens and the diseases they cause, with disease names in English.

SELECT ?var1 ?var2 ?var3Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P225> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q16521> . ?var1 <http://www.wikidata.org/prop/direct/P1542> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What properties are used to describe Finland in Wikidata, and what are their English labels and descriptions?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?propertyItem ?propertyLabel ?propertyDescription WHERE {
  ?item ?directProperty wd:Q33 .
  FILTER ( STRSTARTS( STR( ?directProperty ) , "http://www.wikidata.org/prop/direct/" ) ) BIND( IRI( REPLACE( STR( ?directProperty ) , "http://www.wikidata.org/prop/direct/" , "http://www.wikidata.org/entity/" ) ) AS ?propertyItem ) .
  ?propertyItem rdfs:label ?propertyLabel .
  ?propertyItem schema:description ?propertyDescription .
  FILTER ( LANG( ?propertyLabel ) = "en" ) FILTER ( LANG( ?propertyDescription ) = "en" )
}
LIMIT 100

List all English labels and descriptions of properties that have Finland as their object in Wikidata statements.

Which properties link other entities to Finland, and how are they described in English?

SELECT ?var1 ?var2Label ?var3 WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". { SELECT DISTINCT ?var1 WHERE { ?var4 ?var5 <http://www.wikidata.org/entity/Q33> . ?var1 ?var6 ?var5 . ?var1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . } LIMIT 100 } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var1 <http://schema.org/description> ?var3 . FILTER ( ( ( LANG ( ?var2Label ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . } LIMIT 100


Question: What movie has the IMDb ID tt4085444?

SELECT ?item WHERE { ?item wdt:P345 "tt4085444" . }

Which film on Wikidata is associated with the IMDb identifier tt4085444?

Find the Wikidata item for the movie with IMDb ID tt4085444.

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt4085444". }


Question: List all sports teams from India in English.

SELECT ?team ?teamLabel WHERE { ?team (wdt:P31/wdt:P279*) wd:Q12973014 . ?team rdfs:label ?teamLabel . ?team wdt:P17 wd:Q668 . FILTER(LANG(?teamLabel) = "en")}

What are the English names of all sports teams based in India?

Show me the names of all Indian national and regional sports teams, including cricket, hockey, and others, in English.

SELECT ?var1 ?var1Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q12973014> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q668> . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . }


Question: Rectors with their date of birth, place of birth, and birthplace coordinates

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?rector ?rectorLabel ?dob ?birthplace ?coords WHERE {
  ?rector wdt:P106 wd:Q212071 .
  ?rector wdt:P569 ?dob .
  ?rector wdt:P19 ?birthplace .
  ?birthplace wdt:P625 ?coords .
  ?rector rdfs:label ?rectorLabel .
}

Who are the rectors in Wikidata, and what are their birth dates, birthplaces, and the geographic coordinates of those birthplaces?

List all rectors along with their date of birth, birthplace, and the coordinates of their birthplace.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q212071> . ?var1 <http://www.wikidata.org/prop/direct/P569> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P19> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P625> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P18> ?var5 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Cricket teams in the United Kingdom with English labels

SELECT ?team ?teamLabel WHERE { ?team (wdt:P31/wdt:P279*) wd:Q17376093 . ?team rdfs:label ?teamLabel . ?team wdt:P17 wd:Q145 . FILTER(LANG(?teamLabel) = "en") }

What are the English names of all cricket teams based in the United Kingdom?

List all cricket teams in the UK along with their English names.

SELECT ?var1 ?var1Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q17376093> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q145> . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . }


Question: What is the Wikidata item for Freebase ID /m/019vgs?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P646 "/m/019vgs" .
  ?item rdfs:label ?itemLabel .
  FILTER(LANG(?itemLabel) = "en")
}

Who is Tim Allen in Wikidata, using his Freebase ID /m/019vgs?

Find the English name of the person with Freebase ID /m/019vgs.

SELECT ?var1 ?var1Label ?var2Label ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P646> "/m/019vgs". SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What educational institutions did Genevieve Shaker attend, what degrees did she earn from each, and when did she complete them?

SELECT ?institution ?institutionLabel ?startDate ?endDate ?degreeLabel WHERE { wd:Q33326426 p:P69 ?statement . ?statement ps:P69 ?institution . ?institution rdfs:label ?institutionLabel . FILTER(LANG(?institutionLabel) = "en") OPTIONAL { ?statement pq:P580 ?startDate . } OPTIONAL { ?statement pq:P582 ?endDate . } OPTIONAL { ?statement pq:P512 ?degree . ?degree rdfs:label ?degreeLabel . FILTER(LANG(?degreeLabel) = "en") } }

List Genevieve Shaker’s degrees, the universities she attended, and the completion dates.

Please provide a list of Genevieve Shaker’s academic qualifications, including the institutions, the degrees awarded, and the years she graduated.

SELECT ?var1 ?var2Label ?var3 ?var4 ?var5Label WHERE { <http://www.wikidata.org/entity/Q33326426> <http://www.wikidata.org/prop/P69> ?var6 . ?var6 <http://www.wikidata.org/prop/statement/P69> ?var1 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . FILTER ( ( ( LANG ( ?var2Label ) = "en" ) ) ) . OPTIONAL { ?var6 <http://www.wikidata.org/prop/qualifier/P580> ?var3 . } OPTIONAL { ?var6 <http://www.wikidata.org/prop/qualifier/P582> ?var4 . } OPTIONAL { ?var6 <http://www.wikidata.org/prop/qualifier/P512> ?var7 . ?var7 <http://www.w3.org/2000/01/rdf-schema#label> ?var5Label . FILTER ( ( ( LANG ( ?var5Label ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: What are the buildings in India?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?building ?buildingLabel WHERE {
  ?building wdt:P31 wd:Q41176 .
  ?building wdt:P17 wd:Q668 .
  ?building rdfs:label ?buildingLabel .
  FILTER(LANG(?buildingLabel) = "en")
}
LIMIT 10

List the names of buildings located in India.

Which structures in India are classified as buildings?

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q41176> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q1174336> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } }


Question: How many properties are there in Wikidata, including those that are subclasses of Wikibase property?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT(COUNT(DISTINCT ?property) AS ?count) WHERE {
  {
    ?property wdt:P31 ?class .
    ?class wdt:P279 * wd:Q18616576 .
  } UNION {
    ?property wdt:P31 wd:Q18616576 .
  }
}

What is the total count of items in Wikidata that are defined as properties, either directly or through inheritance?

Can you tell me how many Wikidata properties exist by counting all items that are instances of Wikibase property or its subclasses?

SELECT( COUNT ( DISTINCT ?var1 ) AS ?var2 ) WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P279> * <http://www.wikidata.org/entity/Q18616576> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q18616576> . } }


Question: Wikidata properties with value-type constraints and their allowed subclass types

SELECT ?property ?subClass WHERE { ?property wdt:P31/wdt:P279* wd:Q18616576 . ?property p:P2302 ?constraint . ?constraint ps:P2302 wd:Q21510865 . ?constraint pq:P2308 ?constraintType . ?subClass wdt:P279* ?constraintType . } LIMIT 100

Which Wikidata properties require their values to be subclasses of a certain type, and what are those subclass types?

List all Wikidata properties that have a range constraint specifying that their values must be subclasses of a given type, along with those subclass types.

SELECT ?var1 ?var2 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P279> * <http://www.wikidata.org/entity/Q18616576> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q18616576> . } ?var1 <http://www.wikidata.org/prop/P2302> ?var4 . ?var4 <http://www.wikidata.org/prop/statement/P2302> <http://www.wikidata.org/entity/Q21510865> . ?var4 <http://www.wikidata.org/prop/qualifier/P2308> ?var5 . ?var2 <http://www.wikidata.org/prop/direct/P279> * ?var5 . }


Question: What are the top countries with the most female pornographic actors, excluding former countries?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?countryLabel(COUNT(DISTINCT ?actor) AS ?count) WHERE {
  ?actor wdt:P106 wd:Q488111 .
  ?actor wdt:P21 wd:Q6581072 .
  ?actor wdt:P27 ?country .
  ?country rdfs:label ?countryLabel .
  FILTER(LANG(?countryLabel) = "en")
  FILTER(NOT EXISTS {
    ?country wdt:P31 wd:Q3024240 .
  })
}
GROUP BY ?countryLabel
ORDER BY DESC(?count)

How many female adult performers are citizens of each modern country, and which country has the highest number?

Can you list the countries that have female pornographic actors, sorted by how many there are from each, and exclude countries that no longer exist?

SELECT ?var1Label ( COUNT ( DISTINCT ?var2 ) AS ?var3 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q488111> . ?var2 <http://www.wikidata.org/prop/direct/P21> <http://www.wikidata.org/entity/Q6581072> . ?var2 <http://www.wikidata.org/prop/direct/P27> ?var1 . FILTER ( ( NOT EXISTS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3024240> . } ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1Label ORDER BY DESC( ?var3 )


Question: Authors who co-authored works about maternal death, in all ordered pairs.

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 ?author1 ?author1Label ?author2 ?author2Label WHERE {
  {
    ?work ( wdt:P921 / wdt:P31 * / wdt:P279 * ) wd:Q1339474 .
  } UNION {
    ?work ( wdt:P921 / wdt:P361 + ) wd:Q1339474 .
  } UNION {
    ?work ( wdt:P921 / wdt:P1269 + ) wd:Q1339474 .
  }
  ?work wdt:P50 ?author1 .
  ?work wdt:P50 ?author2 .
  FILTER ( ?author1 != ?author2 ) ?author1 rdfs:label ?author1Label .
  ?author2 rdfs:label ?author2Label .
  FILTER ( LANG( ?author1Label ) = "en" || LANG( ?author1Label ) = "" ) FILTER ( LANG( ?author2Label ) = "en" || LANG( ?author2Label ) = "" )
}

Who are all the pairs of different authors who wrote works where maternal death is the main subject?

List every ordered pair of distinct authors who collaborated on works whose primary topic is maternal death, including their names.

SELECT ?var1 ?var1Label ?var2 ?var2Label WHERE { { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P31> */ <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q1339474> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P361> +) <http://www.wikidata.org/entity/Q1339474> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P1269> +) <http://www.wikidata.org/entity/Q1339474> . } ?var3 <http://www.wikidata.org/prop/direct/P50> ?var1 . ?var3 <http://www.wikidata.org/prop/direct/P50> ?var2 . FILTER ( ( ( ?var1 != ?var2 ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: List non-village administrative units in Ukraine with their coordinates and administrative parent.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
SELECT DISTINCT ?settlementLabel ?settlement ?country ?latitude ?longitude ?administrativeUnitLabel WHERE {
  ?settlement(wdt:P31 / wdt:P279 *) wd:Q56061 . MINUS {
    ?settlement(wdt:P31 / wdt:P279 *) wd:Q532 .
  }
  ?settlement wdt:P17 wd:Q212 .
  ?settlement wdt:P131 ?administrativeUnit .
  ?settlement p:P625 ?statement .
  ?statement psv:P625 ?coordinateNode .
  ?coordinateNode wikibase:geoLatitude ?latitude .
  ?coordinateNode wikibase:geoLongitude ?longitude .
  ?settlement rdfs:label ?settlementLabel .
  FILTER(LANG(?settlementLabel) = "en")
  .
  ?administrativeUnit rdfs:label ?administrativeUnitLabel .
  FILTER(LANG(?administrativeUnitLabel) = "en")
}
ORDER BY ASC(?settlement)

What are the towns and cities in Ukraine (excluding villages), and what administrative regions are they part of, along with their geographic coordinates?

Please provide the English names, coordinates, and immediate administrative divisions of all non-village settlements in Ukraine.

SELECT DISTINCT ?var1Label ( ?var1 AS ?var2 )( ?var3 AS ?var4 ) ?var5 ?var6 ?var7Label ( "2" AS ?var8 )( "en" AS ?var9 ) WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q56061> . ?var1 <http://www.wikidata.org/prop/direct/P131> ?var7 . ?var1 <http://www.wikidata.org/prop/direct/P17> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q212> . ?var1 <http://www.wikidata.org/prop/P625> ?var10 . ?var10 <http://www.wikidata.org/prop/statement/value/P625> ?var11 . ?var11 <http://wikiba.se/ontology#geoLatitude> ?var5 . ?var11 <http://wikiba.se/ontology#geoLongitude> ?var6 . MINUS { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q532> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,uk". } } ORDER BY ASC( ?var1 )


Question: What is the English label of the scholarly article titled 'GWAS'?

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 ?item ?itemLabel WHERE {
  wd:Q57953584 wdt:P31 wd:Q13442814 ; rdfs:label ?itemLabel .
  FILTER ( LANG( ?itemLabel ) = "en" )
}

Is there a scholarly article in Wikidata with the label 'GWAS' in English?

Show me the English label of the scholarly article that is called GWAS.

SELECT DISTINCT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q13442814> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( CONTAINS ( LCASE ( ?var1Label ) , "gwas" ) ) ) . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . }


Question: What are some English labels of humans in Wikidata?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?humanLabel WHERE {
  ?human wdt:P31 wd:Q5 .
  ?human rdfs:label ?humanLabel .
  FILTER ( LANG( ?humanLabel ) = "en" )
}
LIMIT 10

Can you list 10 humans in Wikidata with their English labels?

Show me up to 10 English-language labels for entities that are instances of human.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/prop/direct/Q5> . OPTIONAL { FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . } } LIMIT 10


Question: What are the communes in Ille-et-Vilaine, France, whose names include "Seiche"?

SELECT ?commune ?communeLabel WHERE { ?commune wdt:P31 wd:Q484170 ; wdt:P131 wd:Q12549 ; rdfs:label ?communeLabel . FILTER(LANG(?communeLabel) = "fr") FILTER(CONTAINS(LCASE(?communeLabel), "seiche")) }

Can you list the French-named communes in the department of Ille-et-Vilaine that have "Seiche" in their title?

Show me all communes in Ille-et-Vilaine that contain "Seiche" in their French name.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q484170> ; <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q12549> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = "fr" ) ) ) . FILTER ( ( REGEX ( ?var1Label , "$Seiche" ) ) ) . }


Question: Humans with German as native language, their birth dates and current ages

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?person ?personLabel ?birthDate ?age WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person wdt:P103 wd:Q188 .
  ?person wdt:P569 ?birthDate .
  OPTIONAL {
    ?person rdfs:label ?enLabel .
    FILTER ( LANG( ?enLabel ) = "en" )
  }
  OPTIONAL {
    ?person rdfs:label ?anyLabel
  }
  BIND( COALESCE ( ?enLabel , ?anyLabel ) AS ?personLabel ) BIND( YEAR( NOW () ) - YEAR( ?birthDate ) AS ?age )
}
LIMIT 10

Who are some people whose native language is German, and how old are they?

List 10 people who speak German as their first language, including their names, birth dates, and current ages.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 WHERE { BIND ( ( YEAR ( NOW ( ) ) - YEAR ( ?var4 ) ) AS ?var3 ). ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var1 <http://www.wikidata.org/prop/direct/P103> <http://www.wikidata.org/entity/Q188> . ?var1 <http://www.wikidata.org/prop/direct/P569> ?var2 . } LIMIT 10


Question: Chemical compounds ending in "sterone" without images on Wikimedia Commons.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?compound WHERE {
  ?compound wdt:P31 wd:Q113145171 ; rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" ) FILTER ( REGEX( STR( ?label ) , "sterone$" ) ) OPTIONAL {
    ?compound wdt:P18 ?image
  }
  FILTER ( ! BOUND( ?image ) )
}

Which chemical entities have English names ending in "sterone" and no associated image?

List all chemical entities whose English labels end with "sterone" and do not have an image on Commons.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11173> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . FILTER ( ( REGEX ( ?var1Label , "(sterone)$" ) ) ) . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var2 . } FILTER ( ( !( BOUND ( ?var2 ) ) ) ) . }


Question: Places associated with Thomas Piketty and their locations, including employer, education, and citizenship sites.

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 DISTINCT ?image ?place ?placeLabel ?coordinates ?propertyLabel WHERE {
  wd:Q984448 ?association ?place .
  ?property wikibase:directClaim ?association .
  ?property rdfs:label ?propertyLabel .
  FILTER ( LANG( ?propertyLabel ) = "en" ) OPTIONAL {
    ?place wdt:P18 ?image .
  }
  ?place ( wdt:P625 | ( wdt:P131 * / wdt:P625 ) ) ?coordinates .
  ?place rdfs:label ?placeLabel .
  FILTER ( LANG( ?placeLabel ) = "en" )
}

What are the institutions and countries linked to Thomas Piketty, where are they located, and what type of association do they have with him?

Show me all the places connected to Thomas Piketty — like where he worked, studied, or is a citizen — along with their coordinates and the nature of the connection.

SELECT DISTINCT ?var1 ?var2 ?var2Label ?var3 ( ?var4Label AS ?var5 ) WHERE { <http://www.wikidata.org/entity/Q984448> ?var6 ?var2 . ?var2 (( <http://www.wikidata.org/prop/P159> / <http://www.wikidata.org/prop/qualifier/P625> )|( <http://www.wikidata.org/prop/direct/P276> */ <http://www.wikidata.org/prop/direct/P625> )) ?var3 . ?var7 <http://wikiba.se/ontology#directClaim> ?var6 . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,da,de,es,fr,jp,nl,no,ru,sv,zh". } ?var7 <http://www.w3.org/2000/01/rdf-schema#label> ?var4Label . FILTER ( ( ( LANG ( ?var4Label ) = "en" ) ) ) . }


Question: Which animals produce milk?

SELECT ?taxon WHERE { ?taxon p:P1672 ?statement . ?statement ps:P1672 wd:Q8495 . }

What taxa are known to produce milk according to Wikidata?

List all organisms that produce milk as a natural product.

SELECT ?var1 ?var2 ( SAMPLE ( ?var3 ) AS ?var4 ) WHERE { { SELECT DISTINCT ?var1 ?var2 WHERE { ?var2 <http://www.wikidata.org/prop/statement/P1672> <http://www.wikidata.org/entity/Q8495> . ?var1 <http://www.wikidata.org/prop/P1672> ?var2 . } LIMIT 101 } OPTIONAL { ?var2 ?var3 ?var5 . ?var6 <http://wikiba.se/ontology#qualifier> ?var3 . } } GROUP BY ?var1 ?var2


Question: Who were the members of the 57th Parliament of the United Kingdom?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?person ?personLabel WHERE {
  ?person wdt:P39 wd:Q30524710 .
  ?person rdfs:label ?personLabel .
  FILTER(LANG(?personLabel) = "en")
}

List all individuals who held a seat in the UK Parliament during the 57th term.

Which politicians served as MPs in the UK during the 2017–2019 parliamentary term?

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P39> <http://www.wikidata.org/prop/direct/Q30524710> . }


Question: What are the main topics covered in articles published in the journal Econometrica?

SELECT DISTINCT ?mainSubject ?mainSubjectLabel WHERE { ?article wdt:P1433 wd:Q375835 . ?article wdt:P921 ?mainSubject . FILTER (?mainSubject != wd:Q375835) . ?mainSubject rdfs:label ?mainSubjectLabel . FILTER (lang(?mainSubjectLabel) = "en") }

Can you list the subjects of research articles that appear in Econometrica, excluding the journal itself?

Which economic and non-economic topics are discussed in papers from Econometrica?

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label WHERE { { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P31> */ <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q375835> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P361> +) <http://www.wikidata.org/entity/Q375835> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P1269> +) <http://www.wikidata.org/entity/Q375835> . } ?var3 <http://www.wikidata.org/prop/direct/P921> ?var1 , ?var2 . FILTER ( ( ( <http://www.wikidata.org/entity/Q375835> != ?var1 ) && ( <http://www.wikidata.org/entity/Q375835> != ?var2 ) && ( ?var1 != ?var2 ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: What are the direct subtaxa of monocots?

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 ?childTaxon ?childTaxonLabel WHERE {
  ?childTaxon wdt:P171 wd:Q78961 .
  ?childTaxon rdfs:label ?childTaxonLabel .
  FILTER ( LANG( ?childTaxonLabel ) = "en" )
}

List the taxonomic orders that are directly classified under monocots.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P171> <http://www.wikidata.org/entity/Q78961> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What journals have Sara H. Konrath published in the most, and how many publications does she have in each?

SELECT ?journal ?journalLabel (COUNT(?work) AS ?count)
WHERE {
  ?work wdt:P50 wd:Q33104052 .
  ?work wdt:P1433 ?journal .
  ?journal rdfs:label ?label .
  FILTER(LANG(?label) = "en")
  OPTIONAL { ?journal wdt:P1813 ?shortName }
  BIND(COALESCE(?shortName, ?label) AS ?journalLabel)
}
GROUP BY ?journal ?journalLabel
ORDER BY DESC(?count)

List Sara H. Konrath’s most frequently used publication venues, showing either the full journal name or its abbreviation.

Which academic journals have published the most papers by Sara H. Konrath, ranked by count?

SELECT ?var1 ?var2Label ( COUNT ( ?var3 ) AS ?var4 ) WHERE { ?var3 <http://www.wikidata.org/prop/direct/P50> <http://www.wikidata.org/entity/Q33104052> . ?var3 <http://www.wikidata.org/prop/direct/P1433> ?var1 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var5Label . FILTER ( ( ( LANG ( ?var5Label ) = "en" ) ) ) . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1813> ?var6 . } BIND ( COALESCE ( ?var6 , ?var5Label ) AS ?var2Label ). } GROUP BY ?var1 ?var2Label ORDER BY DESC( ?var4 )


Question: List countries and their heads of government.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?countryLabel ?headOfGovernmentLabel WHERE {
  ?country wdt:P31 wd:Q6256 .
  OPTIONAL {
    ?country wdt:P6 ?headOfGovernment .
    ?headOfGovernment rdfs:label ?headOfGovernmentLabel .
    FILTER ( LANG( ?headOfGovernmentLabel ) = "en" )
  }
  ?country rdfs:label ?countryLabel .
  FILTER ( LANG( ?countryLabel ) = "en" )
}
ORDER BY ASC ( ?countryLabel )

Who is the head of government for each country?

Can you provide a list of all countries along with the names of their current heads of government, sorted alphabetically by country name?

SELECT ?var1Label ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q6256> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P6> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } ORDER BY ASC( ?var1Label )


Question: List islands in Indonesia with their administrative regions and coordinates.

SELECT DISTINCT ?island ?islandLabel ?adminUnitLabel ?countryLabel ?coordinates WHERE { ?island wdt:P31 wd:Q23442 . { ?island wdt:P131 ?adminUnit . ?adminUnit (wdt:P279*) wd:Q1434505 . } UNION { ?island wdt:P17 wd:Q252 . } OPTIONAL { ?island wdt:P17 ?country . ?country rdfs:label ?countryLabel . FILTER(LANG(?countryLabel) = "en") } OPTIONAL { ?island wdt:P625 ?coordinates . } OPTIONAL { ?island wdt:P131 ?adminUnit . ?adminUnit rdfs:label ?adminUnitLabel . FILTER(LANG(?adminUnitLabel) = "en") } ?island rdfs:label ?islandLabel . FILTER(LANG(?islandLabel) = "en") } ORDER BY ASC(?island)

What are the islands located in Indonesia, and which provinces or regions are they part of, along with their geographic coordinates?

Please provide the names of all islands in Indonesia, including the administrative subdivisions they belong to, the country (Indonesia), and their latitude and longitude coordinates.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3Label ?var4 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q23442> . { { ?var5 <http://www.wikidata.org/prop/direct/P279> <http://www.wikidata.org/entity/Q1434505> . ?var2 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) ?var5 . ?var1 <http://www.wikidata.org/prop/direct/P131> ?var2 . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q252> . } } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P17> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P131> ?var2 . } OPTIONAL { ?var6 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5098> . ?var2 <http://www.wikidata.org/prop/direct/P31> ?var6 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "id,en". } } ORDER BY ASC( ?var1 )


Question: List all countries in English.

SELECT ?countryLabel WHERE { ?country wdt:P31 wd:Q6256 . OPTIONAL { ?country wdt:P35 ?headOfState . } OPTIONAL { ?country wdt:P6 ?headOfGovernment . } ?country rdfs:label ?countryLabel . FILTER(LANG(?countryLabel) = "en") }

What are the names of all countries in English?

Show me the English names of all countries.

SELECT ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q6256> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P35> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P6> ?var3 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } GROUP BY ?var1Label


Question: What are the plant families in the order Buxales?

SELECT ?family ?familyLabel WHERE { ?family wdt:P171 wd:Q21020 . ?family rdfs:label ?familyLabel . FILTER(LANG(?familyLabel) = "en") }

Which families are classified under the taxonomic order Buxales?

Can you list the families that have Buxales as their parent taxon?

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P171> <http://www.wikidata.org/entity/Q21020> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Countries with the fewest living actors on Wikidata.

SELECT DISTINCT ?countryLabel ( COUNT( ?actor ) AS ?count ) WHERE { ?actor wdt:P106 wd:Q33999 ; wdt:P166 ?award ; wdt:P27 ?country . ?country rdfs:label ?countryLabel . OPTIONAL { ?actor wdt:P570 ?dateOfDeath . } FILTER ( !BOUND(?dateOfDeath) ) FILTER ( LANG(?countryLabel) = "en" ) } GROUP BY ?countryLabel ORDER BY ASC(?count) LIMIT 10

Which countries have the smallest number of living actors, and how many actors are from each?

List the top 10 countries with the least number of living actors, sorted by count in ascending order.

SELECT DISTINCT ?var1Label ( COUNT ( ?var2 ) AS ?var3 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q33999> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var4 ; <http://www.wikidata.org/prop/direct/P166> ?var5 ; <http://www.wikidata.org/prop/direct/P27> [ <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label ] . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P570> ?var6 . } FILTER ( ( !( BOUND ( ?var6 ) ) ) ) . FILTER ( ( ( LANG ( ?var4 ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . } GROUP BY ?var1Label ORDER BY ASC( ?var3 ) LIMIT 10


Question: Who are the presidents of the United States?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?president WHERE {
  ?president wdt:P39 wd:Q11696 .
}
LIMIT 20

Can you list 20 people who have served as President of the United States?

Which individuals have held the office of President of the United States?

SELECT * WHERE { OPTIONAL { } ?var1 <http://www.wikidata.org/prop/direct/P27> <http://www.wikidata.org/entity/Q11696> . } LIMIT 20


Question: Total awards received by actors born after 1892, grouped by country.

SELECT ?countryLabel (COUNT(?award) AS ?totalAwards)
WHERE {
  ?actor wdt:P106 wd:Q33999 ;
         wdt:P569 ?birthDate ;
         wdt:P27 ?country ;
         wdt:P166 ?award .
  FILTER ( ?birthDate >= "1892-01-01T00:00:00Z"^^xsd:dateTime )
  ?country rdfs:label ?countryLabel .
  FILTER (LANG(?countryLabel) = "en")
}
GROUP BY ?country ?countryLabel
ORDER BY DESC(?totalAwards)

Which countries have the most actors born after 1892 who have won awards, and how many awards did they win in total?

Show me a list of countries ranked by the total number of awards won by actors born after 1892.

SELECT ?var1Label ?var2 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } { SELECT( SAMPLE ( ?var3 ) AS ?var1 )( SUM ( ?var4 ) AS ?var2 ) WHERE { { SELECT( SAMPLE ( ?var5 ) AS ?var6 )( SAMPLE ( ?var1 ) AS ?var3 )( COUNT ( ?var7 ) AS ?var4 ) WHERE { ?var5 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q33999> ; <http://www.wikidata.org/prop/direct/P166> ?var7 ; <http://www.wikidata.org/prop/direct/P569> ?var8 ; <http://www.wikidata.org/prop/direct/P27> ?var1 . FILTER ( ( ( ?var8 >= "1892-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . } GROUP BY ?var5 } } GROUP BY ?var3 ORDER BY DESC( ?var2 ) } }


Question: Administrative regions above Zoza, France

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?admin ?adminLabel WHERE {
  wd:Q742327 wdt:P131 + ?admin .
  ?admin rdfs:label ?adminLabel .
  FILTER(LANG(?adminLabel) = "en")
}

What administrative areas is the commune of Zoza located in, including its region and country?

List all higher-level administrative divisions that include the commune of Zoza in France, in English.

SELECT ?var1 ?var1Label WHERE { <http://www.wikidata.org/entity/Q742327> <http://www.wikidata.org/prop/direct/P131> + ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr". } }


Question: Wikidata quantities greater than one quadrillion with no upper bound

PREFIX wikibase: <http://wikiba.se/ontology#>
SELECT ?valueNode ?amount WHERE {
  ?valueNode wikibase:quantityAmount ?amount .
  OPTIONAL {
    ?valueNode wikibase:quantityUpperBound ?upperBound .
  }
  FILTER ( ?amount >= 1000000000000000 ) FILTER ( ! BOUND( ?upperBound ) )
}

What precise quantities in Wikidata are larger than one quadrillion and do not have an upper limit?

Show me all exact values in Wikidata that are at least one quadrillion and are not represented as ranges.

SELECT * WHERE { ?var1 <http://wikiba.se/ontology#quantityAmount> ?var2 . OPTIONAL { ?var1 <http://wikiba.se/ontology#quantityUpperBound> ?var3 . } FILTER ( ( ( ?var2 >= "1000000000000000"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . FILTER ( ( !( BOUND ( ?var3 ) ) ) ) . }


Question: How many works cite Gitte Moos Knudsen’s publications each year, and how many of those are self-citations?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?year(COUNT(DISTINCT ?citingWork) AS ?citationCount) ?isSelfCitation WHERE {
  ?citedWork wdt:P50 wd:Q5565155 .
  ?citingWork wdt:P2860 ?citedWork .
  ?citingWork wdt:P577 ?pubDate .
  BIND(YEAR(?pubDate) AS ?year)
  BIND(IF(EXISTS {
    ?citingWork wdt:P50 wd:Q5565155
  }
  , "self-citation" , "other-citation") AS ?isSelfCitation)
}
GROUP BY ?year ?isSelfCitation
ORDER BY DESC(?year)

Break down the number of citations to Gitte Moos Knudsen’s works by year and indicate which ones are self-citations.

For each year, show the total number of works citing Gitte Moos Knudsen, separated into self-citations and citations by others.

SELECT ?var1 ( COUNT ( DISTINCT ?var2 ) AS ?var3 ) ?var4 WHERE { BIND ( IF ( EXISTS { ?var2 <http://www.wikidata.org/prop/direct/P50> <http://www.wikidata.org/entity/Q5565155> . } , "string1", "string2" ) AS ?var4 ). BIND ( STR ( YEAR ( ?var5 ) ) AS ?var1 ). ?var6 <http://www.wikidata.org/prop/direct/P50> <http://www.wikidata.org/entity/Q5565155> . ?var2 <http://www.wikidata.org/prop/direct/P2860> ?var6 . ?var2 <http://www.wikidata.org/prop/direct/P577> ?var5 . } GROUP BY ?var1 ?var4 ORDER BY DESC( ?var1 )


Question: What is the English description of RFC 8918?

SELECT ?item ?itemLabel ?description WHERE { ?item wdt:P892 "8918" . OPTIONAL { ?item schema:description ?description . FILTER (LANG(?description) = "en") } ?item rdfs:label ?itemLabel . FILTER (LANG(?itemLabel) = "en") }

Find the Wikipedia-style item for RFC 8918 and its English description.

Which entity in Wikidata has the RFC ID 8918, and what is its English label and description?

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1219> "8918". OPTIONAL { ?var1 <http://schema.org/description> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: People who died on the same day as Mike Bongiorno.

SELECT ?person WHERE { wd:Q327660 wdt:P570 ?deathDate . ?person wdt:P570 ?deathDate . FILTER(?person != wd:Q327660) }

Who else died on September 8, 2009, the same day as Mike Bongiorno?

List all individuals who share the same date of death as Mike Bongiorno, excluding Mike Bongiorno himself.

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/entity/Q327660> <http://www.wikidata.org/prop/direct/P570> . }


Question: What are the taxonomic ranks used in biological classification?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?rank ?rankLabel WHERE {
  ?rank wdt:P31 wd:Q427626 .
  ?rank rdfs:label ?rankLabel .
  FILTER(LANG(?rankLabel) = 'en')
}

Which entities represent taxonomic ranks in Wikidata?

List all valid taxonomic ranks in English from Wikidata.

SELECT ?var1 ?var1Label WHERE { { SELECT DISTINCT ?var1 WHERE { _:bnode <http://www.wikidata.org/prop/direct/P105> ?var1 . FILTER ( ( isIRI ( ?var1 ) ) ) . } LIMIT 21 } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What is the English description of Mount Everest?

SELECT ?item ?itemLabel ?desc WHERE { wd:Q513 rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") . OPTIONAL { wd:Q513 schema:description ?desc . FILTER(LANG(?desc) = "en") } }

Can you tell me the name and description in English of the highest mountain on Earth?

Show me the English label and description for the entity representing Mount Everest.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1219> "8848". OPTIONAL { ?var1 <http://schema.org/description> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Who are the people related to Heinrich Bach, and what is the nature of their relationship?

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?person ?statement ?property(SAMPLE(?qv) AS ?qualifierValue) WHERE {
  {
    SELECT DISTINCT ?person ?statement ?property WHERE {
      ?statement ?statementProperty wd:Q61587 .
      ?person ?claim ?statement .
      ?property wikibase:statementProperty ?statementProperty .
      ?property wikibase:claim ?claim .
      FILTER(?property != wd:P31)
    }
    LIMIT 101
  }
  OPTIONAL {
    ?statement ?qualifier ?qv .
    ?qualifier wikibase:qualifier ?qualifier .
  }
}
GROUP BY ?person ?statement ?property

List the individuals connected to Heinrich Bach through family or professional ties, along with any temporal qualifiers on those connections.

What are the relationships (e.g., child, spouse, father) between Heinrich Bach and other people, and when did those relationships begin?

SELECT ?var1 ?var2 ?var3 ( SAMPLE ( ?var4 ) AS ?var5 ) WHERE { { SELECT DISTINCT ?var1 ?var2 ?var3 WHERE { ?var2 ?var6 <http://www.wikidata.org/entity/Q61587> . ?var1 ?var7 ?var2 . ?var3 <http://wikiba.se/ontology#statementProperty> ?var6 . ?var3 <http://wikiba.se/ontology#claim> ?var7 . FILTER ( ( ( ?var3 != <http://www.wikidata.org/entity/P31> ) ) ) . } LIMIT 101 } OPTIONAL { ?var2 ?var4 ?var8 . ?var9 <http://wikiba.se/ontology#qualifier> ?var4 . } } GROUP BY ?var1 ?var2 ?var3


Question: Creative works from Austria

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?itemLabel WHERE {
  ?item p:P495 ?statement .
  ?statement ps:P495 wd:Q40 .
  ?item rdfs:label ?itemLabel .
  FILTER(LANG(?itemLabel) = "en")
}
LIMIT 100

What are some creative works that originate from Austria?

List up to 100 works that have Austria as their country of origin.

SELECT ?var1 ?var2 ( SAMPLE ( ?var3 ) AS ?var4 ) WHERE { { SELECT DISTINCT ?var1 ?var2 WHERE { ?var2 <http://www.wikidata.org/prop/statement/P495> <http://www.wikidata.org/entity/Q1741> . ?var1 <http://www.wikidata.org/prop/P495> ?var2 . } LIMIT 101 } OPTIONAL { ?var2 ?var3 ?var5 . ?var6 <http://wikiba.se/ontology#qualifier> ?var3 . } } GROUP BY ?var1 ?var2


Question: Spouses of George W. Bush and their marriage start dates

SELECT DISTINCT ?spouse ?startDate WHERE { ?spouse p:P26 ?statement . ?statement ps:P26 wd:Q207 . ?statement pq:P580 ?startDate . } LIMIT 10

Who is married to George W. Bush, and when did their marriage begin?

List George W. Bush’s spouse(s) along with the date their marriage started.

SELECT DISTINCT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/P26> ?var2 . ?var2 <http://www.wikidata.org/prop/statement/P26> <http://www.wikidata.org/entity/Q207> . ?var1 <http://www.wikidata.org/prop/P26> ?var3 . ?var3 <http://www.wikidata.org/prop/statement/P26> <http://www.wikidata.org/entity/Q207> . ?var2 <http://www.wikidata.org/prop/qualifier/P580> ?var4 . } LIMIT 10


Question: German description and gender of Michael Jackson

SELECT ?description ?gender ?coordinates WHERE { wd:Q2831 schema:description ?description . OPTIONAL { wd:Q2831 wdt:P21 ?gender . } OPTIONAL { wd:Q2831 wdt:P625 ?coordinates . } FILTER (LANG(?description) = "de") }

What is Michael Jackson's German description and gender?

Show me the German-language description and sex/gender of Michael Jackson.

SELECT ?var1 ?var2 ?var3 ?var4 ?var5 ?var6 ?var7 ?var8 ?var9 ?var10 ?var11 WHERE { <http://www.wikidata.org/entity/Q2831> <http://schema.org/description> ?var1 . OPTIONAL { <http://www.wikidata.org/entity/Q2831> <http://www.wikidata.org/prop/direct/P21> ?var4 . } OPTIONAL { <http://www.wikidata.org/entity/Q2831> <http://www.wikidata.org/prop/direct/P625> ?var5 . } FILTER ( ( ( LANG ( ?var1 ) = "de" ) ) ) . }


Question: Who were influenced by Rudyard Kipling?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?person ?personLabel WHERE {
  ?person p:P737 ?statement .
  ?statement ps:P737 wd:Q34743 .
  ?person rdfs:label ?personLabel .
  FILTER ( LANG( ?personLabel ) = "en" )
}
LIMIT 100

Which writers or authors have cited Rudyard Kipling as an influence?

List the people who were influenced by the English writer Rudyard Kipling.

SELECT ?var1 ?var2 ( SAMPLE ( ?var3 ) AS ?var4 ) WHERE { { SELECT DISTINCT ?var1 ?var2 WHERE { ?var2 <http://www.wikidata.org/prop/statement/P737> <http://www.wikidata.org/entity/Q34743> . ?var1 <http://www.wikidata.org/prop/P737> ?var2 . } LIMIT 101 } OPTIONAL { ?var2 ?var3 ?var5 . ?var6 <http://wikiba.se/ontology#qualifier> ?var3 . } } GROUP BY ?var1 ?var2


Question: Who are the male grandparents of Michael Mann?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?grandparent ?parent WHERE {
  ?grandparent wdt:P21 wd:Q6581097 .
  ?grandparent wdt:P40 ?parent .
  ?parent wdt:P40 wd:Q214191 .
}
LIMIT 10

List the fathers of Michael Mann’s parents.

SELECT DISTINCT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/P21> ?var3 . ?var3 <http://www.wikidata.org/prop/statement/P21> <http://www.wikidata.org/entity/Q6581097> . ?var1 <http://www.wikidata.org/prop/P40> ?var4 . ?var4 <http://www.wikidata.org/prop/statement/P40> ?var2 . ?var2 <http://www.wikidata.org/prop/P40> ?var5 . ?var5 <http://www.wikidata.org/prop/statement/P40> <http://www.wikidata.org/entity/Q214191> . } LIMIT 10


Question: Genera of ants belonging to subfamilies of Formicidae

SELECT ?family ?familyLabel ?subfamily ?subfamilyLabel ?genus ?genusLabel WHERE {
  BIND( wd:Q7386 AS ?family ) .
  ?genus wdt:P171 ?subfamily .
  ?subfamily wdt:P171 ?family .
  ?family rdfs:label ?familyLabel .
  ?subfamily rdfs:label ?subfamilyLabel .
  ?genus rdfs:label ?genusLabel .
  FILTER(LANG(?familyLabel) = "en")
  FILTER(LANG(?subfamilyLabel) = "en")
  FILTER(LANG(?genusLabel) = "en")
}

What are the genera of ants that are classified under subfamilies of the Formicidae family?

List all ant genera that are two taxonomic levels below the Formicidae family, including their subfamily classification.

SELECT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label WHERE { BIND ( <http://www.wikidata.org/entity/Q7386> AS ?var1 ). ?var3 <http://www.wikidata.org/prop/direct/P171> ?var2 . ?var2 <http://www.wikidata.org/prop/direct/P171> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Citations per year for works by Natalie Portman and Paul Erdős

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 ?year ?author ?authorLabel ( COUNT( ?citingWork ) AS ?citationCount ) WHERE {
  VALUES ?author {
    wd:Q37876 wd:Q173746
  }
  ?work wdt:P50 ?author .
  ?work wdt:P577 ?pubDate .
  BIND( STR( YEAR( ?pubDate ) ) AS ?year ) ?citingWork wdt:P2860 ?work .
  ?author rdfs:label ?authorLabel .
  FILTER ( LANG( ?authorLabel ) = "en" )
}
GROUP BY ?year ?author ?authorLabel
ORDER BY ASC ( ?year )

How many works cite each publication by Natalie Portman and Paul Erdős, grouped by the year of publication?

Show me the number of citations received by each of Natalie Portman’s and Paul Erdős’s published works, broken down by year.

SELECT ?var1 ?var2 ?var3 ?var3Label WHERE { { SELECT ?var3 ?var1 ( COUNT ( ?var4 ) AS ?var2 ) WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". VALUES ( ?var3 ) { ( <http://www.wikidata.org/entity/Q37876> ) ( <http://www.wikidata.org/entity/Q173746> ) } BIND ( STR ( YEAR ( ?var5 ) ) AS ?var1 ). ?var6 <http://www.wikidata.org/prop/direct/P50> ?var3 . ?var6 <http://www.wikidata.org/prop/direct/P577> ?var5 . ?var4 <http://www.wikidata.org/prop/direct/P2860> ?var6 . } GROUP BY ?var3 ?var1 } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( ?var1 )


Question: Lighthouses with 7-character NGA IDs

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?lighthouse ?lighthouseLabel ?ngaId ?idLength WHERE {
  ?lighthouse wdt:P3563 ?ngaId .
  BIND(STRLEN(?ngaId) AS ?idLength)
  FILTER(?idLength = 7)
  .
  ?lighthouse rdfs:label ?lighthouseLabel .
  FILTER(LANG(?lighthouseLabel) = "en")
}
LIMIT 100

Which lighthouses have an NGA lighthouse ID that is exactly 7 characters long?

Show me the English names and NGA IDs of lighthouses whose ID has exactly 7 characters.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 WHERE { BIND ( STRLEN ( ?var3 ) AS ?var4 ). ?var1 <http://www.wikidata.org/prop/direct/P3563> ?var3 . FILTER ( ( ( ?var4 = "7"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } LIMIT 100


Question: What observation towers in Prague are also located in other administrative districts of Prague?

SELECT ?tower ?towerLabel ?coordinate ?adminEntity ?adminEntityLabel WHERE { ?tower wdt:P17 wd:Q213 ; wdt:P31 wd:Q1440300 ; wdt:P625 ?coordinate ; wdt:P131 wd:Q1085 ; wdt:P131 ?adminEntity . FILTER(?adminEntity != wd:Q1085) . ?tower rdfs:label ?towerLabel . ?adminEntity rdfs:label ?adminEntityLabel . FILTER(LANG(?towerLabel) = "en") FILTER(LANG(?adminEntityLabel) = "en") } LIMIT 10

Show me observation towers in Prague that belong to a district other than Prague itself, along with their locations and district names.

Are there any lookout towers in Prague that are administratively part of one of Prague’s districts rather than just the city as a whole?

SELECT( isIRI ( ?var1 ) AS ?var2 ) WHERE { { SELECT ?var3 ?var4 ?var1 WHERE { ?var3 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q213> . ?var3 <http://www.wikidata.org/prop/direct/P625> ?var4 . ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1440300> . ?var3 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q1085> . ?var3 <http://www.wikidata.org/prop/direct/P131> ?var1 . } } } LIMIT 1


Question: Members of The Smashing Pumpkins and their MusicBrainz IDs

SELECT ?member ?memberLabel ?mbid WHERE { wd:Q184217 wdt:P527 ?member . OPTIONAL { ?member wdt:P434 ?mbid . } ?member rdfs:label ?memberLabel . FILTER(LANG(?memberLabel) = "en") }

Who are the members of The Smashing Pumpkins, and what are their MusicBrainz artist IDs?

List the English names of The Smashing Pumpkins' members along with their MusicBrainz identifiers, if available.

SELECT ?var1 ?var2 ?var3 WHERE { ?var2 ?var1 <https://www.wikidata.org/wiki/Q184217> . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P434> ?var3 . } }


Question: Organizations formed in Birmingham and their formation years

SELECT DISTINCT ?organization ?formationYear WHERE { ?organization p:P740 ?statement . ?statement ps:P740 wd:Q2256 . ?organization wdt:P571 ?formationYear . } LIMIT 101

Which bands or organizations were formed in Birmingham, and when were they founded?

Show me a list of up to 101 musical groups that originated in Birmingham, along with the year they were formed.

SELECT ?var1 ?var2 ( SAMPLE ( ?var3 ) AS ?var4 ) WHERE { { SELECT DISTINCT ?var1 ?var2 WHERE { ?var2 <http://www.wikidata.org/prop/statement/P740> <http://www.wikidata.org/entity/Q2256> . ?var1 <http://www.wikidata.org/prop/P740> ?var2 . } LIMIT 101 } OPTIONAL { ?var2 ?var3 ?var5 . ?var6 <http://wikiba.se/ontology#qualifier> ?var3 . } } GROUP BY ?var1 ?var2


Question: Items located in Brazil

SELECT ?item ?statement (SAMPLE(?qualifierProperty) AS ?sampleQualifier)
WHERE {
  {
    SELECT DISTINCT ?item ?statement WHERE {
      ?statement ps:P276 wd:Q155 .
      ?item p:P276 ?statement .
    }
    LIMIT 101
  }
  OPTIONAL {
    ?statement ?qualifierProperty ?qualifierValue .
    ?qualifier wikibase:qualifier ?qualifierProperty .
  }
}
GROUP BY ?item ?statement

What are some items that are located in Brazil?

Show me up to 101 things located in Brazil, along with any additional details (qualifiers) on their location statements.

SELECT ?var1 ?var2 ( SAMPLE ( ?var3 ) AS ?var4 ) WHERE { { SELECT DISTINCT ?var1 ?var2 WHERE { ?var2 <http://www.wikidata.org/prop/statement/P276> <http://www.wikidata.org/entity/Q155> . ?var1 <http://www.wikidata.org/prop/P276> ?var2 . } LIMIT 101 } OPTIONAL { ?var2 ?var3 ?var5 . ?var6 <http://wikiba.se/ontology#qualifier> ?var3 . } } GROUP BY ?var1 ?var2