Question: What are Douglas Adams' occupations, fields of work, and notable works, along with their English labels and associated images?

SELECT ?property ?propertyLabel ?object ?objectLabel ?image WHERE { wd:Q42 ?property ?object . BIND( IRI( CONCAT( "http://www.wikidata.org/entity/", STRAFTER( STR(?property), "http://www.wikidata.org/prop/direct/" ) ) ) AS ?propertyItem ) . ?propertyItem rdfs:label ?propertyLabel . ?object rdfs:label ?objectLabel . FILTER (LANG(?propertyLabel) = "en" && LANG(?objectLabel) = "en") OPTIONAL { ?object wdt:P18 ?image } } ORDER BY ?property ?object

What properties describe Douglas Adams, what are their English labels, what do they point to, and are there images of those things?

List all properties of Douglas Adams with their English labels, the entities they link to, the English labels of those entities, and any images of those entities.

SELECT ?var1 ?var2Label ?var3 ?var4Label ?var5 WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". { BIND ( <http://www.wikidata.org/entity/Q42> AS ?var3 ). BIND ( "N/A" AS ?var1 ). BIND ( "identity"@en AS ?var2Label ). } UNION { <http://www.wikidata.org/entity/Q42> ?var1 ?var3 . ?var6 ?var7 ?var1 . ?var6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Url> . ?var6 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . } ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var4Label . FILTER ( ( ( LANG ( ?var4Label ) = "en" ) ) ) . OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P18> ?var5 . } FILTER ( ( ( LANG ( ?var2Label ) = "en" ) ) ) . } ORDER BY ASC( ?var1 )ASC( ?var3 )


Question: What are the female population numbers for different places?

SELECT ?place ?placeLabel ?femalePopulation WHERE { ?place wdt:P1539 ?femalePopulation . ?place rdfs:label ?placeLabel . FILTER(LANG(?placeLabel) = "en") } LIMIT 10

List places along with their female population counts in English.

Which locations have recorded female population data, and what are those numbers?

SELECT DISTINCT * WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1539> ?var2 . } LIMIT 10


Question: Cities with images on Wikimedia Commons

SELECT ?city ?cityLabel ?image WHERE { ?city wdt:P31 wd:Q515 . OPTIONAL { ?city wdt:P18 ?image . } }

What are the cities in the world, and do they have images available on Wikimedia Commons?

List all cities and their associated images from Wikimedia Commons.

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


Question: Cities that are also municipalities with their coordinates

SELECT ?cityOrMunicipality (SAMPLE(?label) AS ?cityOrMunicipalityLabel) ?coordinates WHERE { ?cityOrMunicipality wdt:P31 wd:Q515 ; wdt:P31 wd:Q15284 . OPTIONAL { ?cityOrMunicipality wdt:P625 ?coordinates . } ?cityOrMunicipality rdfs:label ?label . } GROUP BY ?cityOrMunicipality ?coordinates LIMIT 100

Which cities are classified as municipalities, and what are their geographic coordinates?

List all cities that are municipalities along with their locations.

SELECT ?var1 ?var1Label ?var2 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q515> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q15284> . } LIMIT 1000000


Question: Coordinates, country, and official languages of San Francisco

SELECT DISTINCT ?cityLabel ?coordinates ?countryLabel ?languageLabel WHERE { wd:Q62 wdt:P625 ?coordinates . wd:Q62 wdt:P17 ?country . OPTIONAL { wd:Q62 wdt:P37 ?language . } wd:Q62 rdfs:label ?cityLabel . ?country rdfs:label ?countryLabel . OPTIONAL { ?language rdfs:label ?languageLabel . } FILTER(LANG(?cityLabel) = "en") FILTER(LANG(?countryLabel) = "en") FILTER(LANG(?languageLabel) = "en" || !BOUND(?languageLabel)) }

What are the geographic coordinates, country, and official languages of San Francisco?

Tell me the location, country, and official languages of San Francisco.

SELECT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label ?var4 ?var4Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q486972> . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P17> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( ( ?var1 = <http://www.wikidata.org/entity/Q62> ) ) ) . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P37> ?var4 . } }


Question: What are the geographic coordinates of New York City, given that Los Angeles is in the same country?

SELECT ?coordinates WHERE { wd:Q65 wdt:P17 ?country . wd:Q60 wdt:P17 ?country ; wdt:P625 ?coordinates . }

Show me the coordinates of New York City, assuming it shares a country with Los Angeles.

Coordinates of New York City in the same country as Los Angeles

SELECT ?var1 WHERE { ?var2 <http://www.w3.org/2000/01/rdf-schema#label> "string1"@en ; <http://www.wikidata.org/prop/direct/P17> ?var3 . ?var4 <http://www.w3.org/2000/01/rdf-schema#label> "New York"@en ; ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q486972> ; <http://www.wikidata.org/prop/direct/P17> ?var3 ; <http://www.wikidata.org/prop/direct/P625> ?var1 . }


Question: List human settlements with their population, country, and short description in English.

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 ?settlement ?settlementLabel ?description ?population ?countryLabel WHERE {
  ?settlement wdt:P31 wd:Q486972 .
  ?settlement rdfs:label ?settlementLabel .
  FILTER(LANG(?settlementLabel) = "en")
  OPTIONAL {
    ?settlement wdt:P1813 ?description .
    FILTER(LANG(?description) = "en")
  }
  ?settlement wdt:P1082 ?population .
  ?settlement wdt:P17 ?country .
  ?country rdfs:label ?countryLabel .
  FILTER(LANG(?countryLabel) = "en")
}
LIMIT 20

What are some human settlements around the world, along with their population, country, and a brief description in English?

Show me up to 20 human settlements, including their English labels, population numbers, countries, and short descriptions if available.

SELECT DISTINCT * WHERE { ?var1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/resource/Settlement> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label ; <http://dbpedia.org/resource/abstract> ?var3 ; <http://dbpedia.org/resource/populationTotal> ?var4 ; <http://dbpedia.org/resource/country> ?var5 . } LIMIT 20


Question: Cities with population and coordinates, sorted by lowest population

SELECT DISTINCT ?cityLabel ?population ?coordinates WHERE { ?city (wdt:P31/wdt:P279*) wd:Q515 . ?city wdt:P1082 ?population . ?city wdt:P625 ?coordinates . ?city rdfs:label ?cityLabel . FILTER(LANG(?cityLabel) = "en") } ORDER BY ASC(?population) LIMIT 10

What are the 10 cities with the smallest populations, along with their coordinates?

Show me the English names, populations, and geographic coordinates of the 10 smallest cities (by population), including historical ones like Pompeii.

SELECT DISTINCT ?var1Label ?var2 ?var3 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/P625> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( ?var2 ) LIMIT 10


Question: Who is Jack Dorol in French?

SELECT ?person WHERE { ?person rdfs:label "Jack Dorol" @fr . ?person wdt:P31 wd:Q5 .}

What is the Wikidata identifier for the French-labeled person named Jack Dorol?

Find the human named Jack Dorol in French.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> "Jack Dorol"@fr . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . }


Question: Top countries by population and their associated religions.

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 ?country ?countryLabel ?population ?religionLabel WHERE {
  ?country wdt:P31 wd:Q3624078 ; wdt:P1082 ?population ; wdt:P140 ?religion .
  ?country rdfs:label ?countryLabel .
  ?religion rdfs:label ?religionLabel .
  FILTER ( LANG( ?countryLabel ) = "en" ) FILTER ( LANG( ?religionLabel ) = "en" )
}
ORDER BY DESC ( ?population )
LIMIT 100

What are the most populous countries in the world and what religions are associated with them?

Show me the 100 most populous sovereign states and their official or predominant religions, sorted by population.

SELECT ?var1 ?var1Label ?var2 ?var3Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> ) <http://www.wikidata.org/entity/Q3624078> ; <http://www.wikidata.org/prop/direct/P1082> ?var2 ; <http://www.wikidata.org/prop/direct/P140> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "es,en". } } ORDER BY DESC( ?var2 ) LIMIT 100


Question: Top 10 most populous cities in the United States

SELECT DISTINCT ?city ?cityLabel ?population WHERE { ?city (wdt:P31/wdt:P279*) wd:Q515 . ?city wdt:P17 wd:Q30 . ?city wdt:P1082 ?population . ?city rdfs:label ?cityLabel . FILTER(LANG(?cityLabel) = "en") } ORDER BY DESC(?population) LIMIT 10

What are the 10 most populous cities in the United States, and what are their populations?

List the 10 largest cities in the United States by population, including their names and population numbers.

SELECT DISTINCT ?var1 ?var1Label ?var2 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/P17> <http://www.wikidata.org/entity/Q30> . ?var1 <http://www.wikidata.org/prop/direct/P1082> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY DESC( ?var2 ) LIMIT 10


Question: List all countries and their ISO 3166-1 alpha-2 codes in English.

SELECT ?country ?label ?isoCode WHERE { ?country wdt:P31 wd:Q6256 . ?country wdt:P297 ?isoCode . ?country rdfs:label ?label . FILTER(LANG(?label) = "en") }

What are the English names and two-letter ISO codes of all countries?

Please provide the English labels and ISO 3166-1 alpha-2 codes for all recognized countries.

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


Question: List of English-named districts of Albania

SELECT ?district ?districtLabel WHERE { ?district wdt:P31 wd:Q123266 . ?district rdfs:label ?districtLabel . FILTER(LANG(?districtLabel) = "en") }

What are the districts of Albania in English?

Show me the names of all districts in Albania in English.

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


Question: List all towns, townships, and subdistricts in Liuzhi Special District with their official Chinese names and administrative codes.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?officialName ?adminCode WHERE {
  ?item wdt:P131 wd:Q1200315 .
  OPTIONAL {
    ?item wdt:P1448 ?officialName .
  }
  OPTIONAL {
    ?item wdt:P442 ?adminCode .
  }
}

What are the official Chinese names and China administrative division codes of places located in Liuzhi Special District?

Can you provide the Chinese official names and administrative codes for all administrative subdivisions within Liuzhi Special District, including those that might not have a code or name recorded?

SELECT ?var1 ?var2 ?var3 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "zh,zh". } OPTIONAL { } ?var1 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q1200315> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1448> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P442> ?var3 . } }


Question: Countries with population similar to Russia

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 ?country ?countryLabel ?population WHERE {
  wd:Q159 wdt:P1082 ?russiaPopulation .
  ?country wdt:P31 wd:Q3624078 .
  ?country wdt:P1082 ?population .
  ?country rdfs:label ?countryLabel .
  FILTER(LANG(?countryLabel) = "en")
  FILTER(ABS(?russiaPopulation - ?population) < 20000000)
}
ORDER BY DESC(?population)

Which countries have a population within 20 million of Russia’s population?

List countries and their populations that are close to Russia’s population.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 WHERE { <http://www.wikidata.org/entity/Q159> <http://www.wikidata.org/prop/direct/P1082> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P1082> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P276> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "nl". } FILTER ( ( ( ABS ( ( ?var4 - ?var2 ) ) < "1000"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . }


Question: Countries and their populations, sorted from highest to lowest.

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 ?country ?countryLabel ?population WHERE {
  ?country(wdt:P31 / wdt:P279 *) wd:Q6256 ; wdt:P1082 ?population .
  ?country rdfs:label ?countryLabel .
  FILTER(LANG(?countryLabel) = "en")
}
ORDER BY DESC(?population)
LIMIT 200

What are the top 200 countries by population, along with their English names?

List the 200 most populous countries in the world with their English names and population numbers.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q6256> ; <http://www.wikidata.org/prop/direct/P1082> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } ORDER BY DESC( ?var1 ) LIMIT 200


Question: Places with population over 100,000, their coordinates, time zones, and UTC offsets.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?place ?placeLabel ?coordinates ?population ?elevation ?timezone ?utcOffset WHERE {
  ?place wdt:P1082 ?population .
  ?place wdt:P625 ?coordinates .
  ?place wdt:P421 ?timezone .
  OPTIONAL {
    ?place wdt:P2044 ?elevation .
    ?timezone wdt:P2907 ?utcOffset .
  }
  FILTER(?population > 100000)
  OPTIONAL {
    ?place rdfs:label ?placeLabel .
    FILTER(LANG(?placeLabel) = "en")
  }
}

Which geographic places have a population greater than 100,000, and what are their coordinates, elevations, time zones, and corresponding UTC offsets?

List all places with more than 100,000 residents, including their geographic coordinates, elevation (if available), time zone, and the numeric UTC offset of that time zone.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1082> ?var3 . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P421> ?var5 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "nl". } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P2044> ?var4 . ?var5 <http://www.wikidata.org/prop/direct/P2907> ?var6 . } FILTER ( ( ( ?var3 > "100000"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . }


Question: What are some measuring instruments and who invented them?

SELECT ?instrument ?instrumentLabel ?inventor ?inventorLabel WHERE { ?instrument (wdt:P31/wdt:P279*) wd:Q2041172 . ?instrument wdt:P61 ?inventor . ?instrument rdfs:label ?instrumentLabel . ?inventor rdfs:label ?inventorLabel . FILTER(LANG(?instrumentLabel) = "en") FILTER(LANG(?inventorLabel) = "en") }

Can you list the inventors of all types of measuring instruments, including subclasses like telescopes and spectrometers?

Who discovered or invented devices used for physical measurement, such as the Vernier scale or the Curta calculator?

SELECT ?var1 ?var1Label ?var2Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q2041172> . ?var1 <http://www.wikidata.org/prop/direct/P61> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr,en". } }


Question: List all databases in Wikidata, including properties marked as databases.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?database WHERE {
  ?database wdt:P31 wd:Q8513 .
}
LIMIT 100

What entities in Wikidata are classified as databases?

Show me all items and properties in Wikidata that are instances of a database.

SELECT ?var1 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr,en". } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q8513> . OPTIONAL { } OPTIONAL { } } LIMIT 100


Question: Which properties are related to the media legend property in German?

SELECT ?relatedProperty ?label ?description WHERE { wd:P2096 wdt:P1659 ?relatedProperty . ?relatedProperty rdfs:label ?label . ?relatedProperty schema:description ?description . FILTER ( LANG( ?label ) = "de" ) . FILTER ( LANG( ?description ) = "de" ) . }

What are the German labels and descriptions of properties related to the media legend (P2096) on Wikidata?

Show me the German labels and descriptions of all properties that are linked as related to the media legend property (P2096).

SELECT ?var1 ?var2Label ?var3 WHERE { BIND ( <http://www.wikidata.org/prop/direct/P2096> AS ?var4 ). ?var5 ?var6 ?var4 . ?var5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . ?var5 <http://www.wikidata.org/prop/direct/P1659> ?var1 . ?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" ) ) ) . }


Question: Human settlements in Taiwan with English or Chinese Wikipedia pages and their 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/>
PREFIX schema: <http://schema.org/>
SELECT ?var1 ?var1Label ?var2 ?var3 WHERE {
  ?var1 wdt:P31 / wdt:P279 * wd:Q486972 .
  ?var1 wdt:P17 wd:Q865 .
  ?var1 wdt:P625 ?var2 .
  ?var3 schema:about ?var1 .
  FILTER(STRSTARTS(STR(?var3) , "https://en.wikipedia.org/wiki/") || STRSTARTS(STR(?var3) , "https://zh.wikipedia.org/wiki/"))
  OPTIONAL {
    ?var1 rdfs:label ?var1Label .
    FILTER(LANG(?var1Label) = "en")
  }
}

What are the human settlements in Taiwan that have Wikipedia articles in English or Chinese, and what are their geographic coordinates?

List the English names, coordinates, and Wikipedia links of human settlements located in Taiwan that have articles on the English or Chinese Wikipedia.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q486972> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q865> . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . ?var3 <http://schema.org/about> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de". } FILTER ( ( ( SUBSTR ( STR ( ?var3 ) ,"09"^^<http://www.w3.org/2001/XMLSchema#integer> ,"18"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string1" ) || ( SUBSTR ( STR ( ?var3 ) ,"09"^^<http://www.w3.org/2001/XMLSchema#integer> ,"17"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string2" ) || ( SUBSTR ( STR ( ?var3 ) ,"09"^^<http://www.w3.org/2001/XMLSchema#integer> ,"18"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string3" ) || ( SUBSTR ( STR ( ?var3 ) ,"09"^^<http://www.w3.org/2001/XMLSchema#integer> ,"17"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string4" ) ) ) . }


Question: What are the neighborhoods in San Francisco and their corresponding English Wikipedia pages?

SELECT ?neighborhood ?wikipediaPage WHERE { ?neighborhood wdt:P31 wd:Q123705 . ?neighborhood wdt:P131 wd:Q62 . ?wikipediaPage schema:about ?neighborhood . ?wikipediaPage schema:isPartOf <https://en.wikipedia.org/> .}

List English Wikipedia pages for neighborhoods in San Francisco.

Show me all neighborhoods in San Francisco, along with the links to their English Wikipedia articles.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q123705> . ?var2 <http://schema.org/about> ?var1 . ?var2 <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". } ?var1 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q62> . }


Question: Coordinates of Repulse Bay

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?coord WHERE {
  wd:Q837547 wdt:P625 ?coord .
}

What are the geographic coordinates of Repulse Bay?

Show me the location coordinates for Repulse Bay.

SELECT * WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> */ <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q837547> . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . }


Question: Cities and their populations

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 ?city ?label ?population WHERE {
  ?city(wdt:P31 / wdt:P279 *) wd:Q515 .
  ?city wdt:P1082 ?population .
  ?city rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}

What are the English names and populations of all cities and their subclasses in Wikidata?

List the names and population numbers of all cities (including subclasses of cities) with English labels.

SELECT ?var1 ?var1Label ?var2 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 . }


Question: List all datasets in Wikidata sorted alphabetically by name.

SELECT DISTINCT ?var1 ?var1Label WHERE { ?var1 wdt:P31 wd:Q1172284 . ?var1 rdfs:label ?var1Label . FILTER(LANG(?var1Label) = "en") } ORDER BY ASC(?var1Label)

What are the English-named datasets in Wikidata, ordered alphabetically?

Show me a list of datasets from Wikidata with their English labels, sorted from A to Z.

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


Question: What geographic entities (such as country, region, or continent) is Mansfield House in Harrogate connected to?

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 ?result ?resultLabel WHERE {
  wd:Q26602165(wdt:P17 | wdt:P131 | wdt:P30) * ?result .
  FILTER(?result != wd:Q26602165)
  ?result rdfs:label ?resultLabel .
  FILTER(LANG(?resultLabel) = "en")
}
LIMIT 100

Can you list all the administrative divisions and continents that Mansfield House belongs to, starting from the town of Harrogate?

Show me the location hierarchy of Mansfield House in England, including its town, county, country, and continent.

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q26602165> 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: Wikidata RDF dump formats and their images

SELECT ?format ?label ?image WHERE { ?format wdt:P361 wd:Q32786132 . OPTIONAL { ?format wdt:P18 ?image . } ?format rdfs:label ?label . FILTER(LANG(?label) = "en") } LIMIT 100

What are the serialization formats of the Wikidata RDF dump, and do any of them have associated images?

List the formats that are part of the Wikidata RDF dump, along with their English labels and any available images.

SELECT ?var1 ?var2Label ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P361> <http://www.wikidata.org/entity/Q32786132> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var3 . } } LIMIT 100


Question: What is the most populous city in each country?

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 ?country ?city ?countryLabel ?cityLabel WHERE {
  {
    SELECT ?country(MAX(?population) AS ?maxPopulation) WHERE {
      ?city wdt:P31 wd:Q515 .
      ?city wdt:P1082 ?population .
      ?city wdt:P17 ?country .
    }
    GROUP BY ?country
  }
  ?city wdt:P31 wd:Q515 .
  ?city wdt:P1082 ?maxPopulation .
  ?city wdt:P17 ?country .
  ?country rdfs:label ?countryLabel .
  ?city rdfs:label ?cityLabel .
  FILTER(LANG(?countryLabel) = "en" || LANG(?countryLabel) = "")
  FILTER(LANG(?cityLabel) = "en" || LANG(?cityLabel) = "")
}
ORDER BY ?countryLabel

For every country, which city has the largest population, and what are their names?

Which city has the highest population in each country, and what are the names of those countries?

SELECT ?var1 ?var2 ?var1Label ?var2Label WHERE { { SELECT ?var1 ( MAX ( ?var3 ) AS ?var3 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q515> . ?var2 <http://www.wikidata.org/prop/direct/P1082> ?var3 . ?var2 <http://www.wikidata.org/prop/direct/P17> ?var1 . } GROUP BY ?var1 } ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q515> . ?var2 <http://www.wikidata.org/prop/direct/P1082> ?var3 . ?var2 <http://www.wikidata.org/prop/direct/P17> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "uk". } } ORDER BY ASC( ?var1Label )


Question: What is the English label of a watch, and what is the English name of the language it is labeled in?

SELECT ?var1 ?var2 ?var3Label WHERE { wd:Q178794 rdfs:label ?var1 ; rdfs:label ?var3Label . FILTER (LANG(?var1) = "en") . ?lang wdt:P424 "en" ; wdt:P31 wd:Q34770 . ?lang rdfs:label ?var2 . FILTER (LANG(?var2) = "en") }

Show the English name of the watch and all its other language labels, along with the English name of the language code "en".

For the item "watch", retrieve its English label, the label in other languages, and confirm that the language code "en" corresponds to "English".

SELECT ?var1 ?var2 ?var3Label WHERE { BIND ( LANG ( ?var3Label ) AS ?var4 ). <http://www.wikidata.org/entity/Q178794> <http://www.w3.org/2000/01/rdf-schema#label> ?var1 ; <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . FILTER ( ( ( LANG ( ?var1 ) = "en" ) ) ) . ?var4 ^ <http://www.wikidata.org/prop/statement/P424> ?var5 . ?var5 <http://www.wikidata.org/prop/qualifier/P794> <http://www.wikidata.org/entity/Q22283033> ; ^ <http://www.wikidata.org/prop/P424> ?var6 . ?var6 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . }


Question: What are the known SPARQL query languages and their versions?

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 ?item ?label WHERE {
  ?item wdt:P31 / wdt:P279 * wd:Q6138701 .
  ?item rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}
ORDER BY ?label

Can you list the Wikidata items for SPARQL and its related RDF query languages?

Show me the English-labeled items that are instances or subclasses of RDF query languages, particularly those related to SPARQL.

SELECT ?var1 ?var2 WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". SERVICE <http://tools.wmflabs.org/mw2sparql/sparql> { VALUES ( ?var3 ) { ( <https://en.wikipedia.org/wiki/SPARQL> ) } ?var3 <http://tools.wmflabs.org/mw2sparql/ontology#internalLinkTo> ?var1 . } ?var1 <http://schema.org/about> ?var2 . }


Question: Adjacent districts of Vienna

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 ?district1Label ?district2Label WHERE {
  ?district1 wdt:P31 wd:Q261023 ; wdt:P47 ?district2 .
  ?district2 wdt:P31 wd:Q261023 .
  FILTER ( ?district1 < ?district2 ) .
  ?district1 rdfs:label ?district1Label .
  ?district2 rdfs:label ?district2Label .
  FILTER ( lang( ?district1Label ) = "en" ) .
  FILTER ( lang( ?district2Label ) = "en" )
}

Which pairs of Vienna districts share a border?

List all pairs of Vienna districts that are adjacent, showing each pair only once with their English names.

SELECT DISTINCT ?var1Label ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q261023> ; <http://www.wikidata.org/prop/direct/P1545> ?var3 . ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q261023> ; <http://www.wikidata.org/prop/direct/P1545> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P47> ?var2 . FILTER ( ( ( ?var3 < ?var4 ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de". } }


Question: What are the population and area of each district in Vienna, Austria?

SELECT DISTINCT ?districtLabel ?coord ?population ?area ?countryLabel ?adminLabel WHERE { ?district wdt:P31 wd:Q261023 . ?district wdt:P625 ?coord . ?district wdt:P17 ?country . ?district wdt:P131 ?admin . OPTIONAL { ?district wdt:P1082 ?population . } OPTIONAL { ?district wdt:P2046 ?area . } ?district rdfs:label ?districtLabel . ?country rdfs:label ?countryLabel . ?admin rdfs:label ?adminLabel . FILTER(LANG(?districtLabel) = "en") FILTER(LANG(?countryLabel) = "en") FILTER(LANG(?adminLabel) = "en") } ORDER BY ?districtLabel

List the 23 districts of Vienna along with their population, area, and administrative parent.

Show me the geographic and demographic details of Vienna's districts, including coordinates, population, and area.

SELECT DISTINCT ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6Label ?var7Label ?var8 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q15916867> . SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(16 48)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "10". <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#distance> ?var3 . } ?var1 <http://www.wikidata.org/prop/direct/P1082> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P2046> ?var5 . ?var1 <http://www.wikidata.org/prop/direct/P17> ?var6 . ?var1 <http://www.wikidata.org/prop/direct/P131> ?var7 . ?var1 <http://www.wikidata.org/prop/direct/P132> ?var8 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de". } } ORDER BY ASC( ?var3 )


Question: Humans with "Chouli" in their French name

SELECT DISTINCT ?person WHERE { ?person rdfs:label ?label . FILTER(LANG(?label) = "fr") FILTER(CONTAINS(LCASE(?label), "chouli")) ?person wdt:P31 wd:Q5 .}

Who are the French-named people whose names include "Chouli"?

List all humans whose French label contains the word "Chouli".

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> "chouli"@fr . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . }


Question: Countries with at least one city that has a recorded population.

SELECT DISTINCT ?country ?countryLabel WHERE { ?country wdt:P31 wd:Q6256 . ?city wdt:P17 ?country . ?city wdt:P31 wd:Q515 . ?city wdt:P1082 ?population . ?country rdfs:label ?countryLabel . FILTER(LANG(?countryLabel) = "en") } LIMIT 30

Which countries have cities with population data?

List the English names of countries that contain at least one city with a known population.

SELECT DISTINCT ?var1 ?var2 WHERE { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q6256> . ?var3 <http://www.wikidata.org/prop/direct/P17> ?var1 . ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q515> . ?var3 <http://www.wikidata.org/prop/direct/P1082> [] . } LIMIT 30


Question: What are the notable places in Lviv, Ukraine, along with their images, Wikimedia Commons categories, and addresses?

SELECT ?item ?itemLabel ?coord ?image ?category ?address WHERE { ?item wdt:P131 wd:Q36036 . OPTIONAL { ?item wdt:P625 ?coord . } OPTIONAL { ?item wdt:P18 ?image . } OPTIONAL { ?item wdt:P373 ?category . } OPTIONAL { ?item wdt:P969 ?address . } ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") } LIMIT 100

Show me buildings, streets, and landmarks in Lviv that have photos on Wikimedia Commons, their categories, and physical addresses.

List entities located in Lviv with their English labels, geographic coordinates, images, Commons categories, and street addresses.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 ?var7 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(24 49)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(25 49)"^^<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 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P969> ?var7 . } 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: Who is Didier Jau in French, and is he a human?

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 ?person WHERE {
  ?person rdfs:label "Didier Jau" @fr .
  ?person wdt:P31 wd:Q5 .
}

What is the Wikidata item for the person named 'Didier Jau' in French?

Find the human entity in Wikidata that has the French label 'Didier Jau'.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> "Didier JAU"@fr . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . }


Question: Top 20 geographic features near Nuremberg with the most Wikidata properties, within 1.5 km of coordinates 11°E, 49°N.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
SELECT ?item ?itemLabel ?lat ?lon ( COUNT( ?statement ) AS ?statementCount ) WHERE {
  ?item wdt:P625 ?coord .
  BIND( geof:latitude ( ?coord ) AS ?lat ) BIND( geof:longitude ( ?coord ) AS ?lon ) FILTER ( ?lat >= 48.985 && ?lat <= 49.015 ) FILTER ( ?lon >= 10.985 && ?lon <= 11.015 ) FILTER ( geof:distance ( ?coord , "POINT(11 49)" ^^ geo:wktLiteral ) <= 1500 ) ?item ?p ?statement .
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER ( LANG( ?itemLabel ) = "en" )
  }
}
GROUP BY ?item ?itemLabel ?lat ?lon
ORDER BY DESC ( ?statementCount )
LIMIT 20

What are the 20 most well-documented places within 1.5 kilometers of (11, 49), and what are their coordinates and labels?

List the 20 entities closest to the point (11, 49) that have the highest number of statements in Wikidata, including their English labels and geographic coordinates.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { ?var1 ?var4 ?var5 . ?var1 <http://www.wikidata.org/prop/P625> ?var6 ; <http://www.wikidata.org/prop/P625> [ <http://www.wikidata.org/prop/statement/P625> ?var7 ; <http://www.wikidata.org/prop/statement/value/P625> [ <http://wikiba.se/ontology#geoLongitude> ?var3 ; <http://wikiba.se/ontology#geoLatitude> ?var2 ] ] . SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var8 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(11 49)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "1.4920504681657234". } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var1Label ?var2 ?var3 ORDER BY DESC(COUNT ( ?var4 )) LIMIT 20


Question: English name, description, and image of tin

PREFIX schema: <http://schema.org/>
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 ?label ?description ?image WHERE {
  OPTIONAL {
    wd:Q1096 rdfs:label ?label .
    FILTER ( LANG( ?label ) = "en" )
  }
  OPTIONAL {
    wd:Q1096 wdt:P18 ?image .
  }
  OPTIONAL {
    wd:Q1096 schema:description ?description .
    FILTER ( LANG( ?description ) = "en" )
  }
}

What is the English name, description, and image of the chemical element tin?

Show me the English label, description, and Wikimedia Commons image for tin.

SELECT ?var1Label ?var2 ?var3 WHERE { OPTIONAL { <http://www.wikidata.org/entity/Q1096> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q1096> <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { <http://www.wikidata.org/entity/Q1096> <http://schema.org/description> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . } }


Question: What is the type and name of the economy of Scotland?

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

What class is the economy of Scotland an instance of, and what is its English label?

Show me the English label of the economy of Scotland and the English label of the category it belongs to.

SELECT ?var1 ?var2Label WHERE { <http://www.wikidata.org/entity/Q3175225> <http://www.wikidata.org/prop/direct/P31> ?var3 ; <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var1 . FILTER ( ( ( "en" = LANG ( ?var2Label ) ) ) ) . FILTER ( ( ( "en" = LANG ( ?var1 ) ) ) ) . }


Question: Classes that Allenjoie belongs to, including superclasses.

SELECT ?class ?classLabel WHERE { wd:Q835906 (wdt:P31 / wdt:P279*) ?class . ?class rdfs:label ?classLabel . FILTER(LANG(?classLabel) = "en") }

What types and broader categories does the French commune Allenjoie belong to?

List all the hierarchical classes (from direct type to highest superclass) that Allenjoie is an instance of.

SELECT ?var1 ?var1Label WHERE { <http://www.wikidata.org/entity/Q835906> ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr, en". } }


Question: What are all the geographical locations (from local to global) that the Cross Keys pub is part of?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?var1 WHERE {
  VALUES ?start {
    wd:Q17986739
  }
  {
    ?start wdt:P131 + ?var1 .
  } UNION {
    ?start wdt:P17 ?var1 .
  } UNION {
    ?start wdt:P17 ?country .
    ?country wdt:P30 ?var1 .
  }
}

Starting from the Cross Keys pub in Covent Garden, what countries, administrative regions, and continents does it belong to?

Show me the full location chain of Cross Keys, including its city, region, country, and continent.

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q17986739> 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: What are some cities in India with their administrative divisions, images, and Wikipedia pages?

PREFIX schema: <http://schema.org/>
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 DISTINCT ?city ?cityLabel ?admin2Label ?admin1Label ?image ?wikipedia ?website ?coord WHERE {
  ?city ( wdt:P31 / wdt:P279 * ) wd:Q515 .
  ?city wdt:P131 + wd:Q668 .
  ?city rdfs:label ?cityLabel .
  FILTER ( LANG( ?cityLabel ) = "en" ) OPTIONAL {
    ?city wdt:P18 ?image .
  }
  OPTIONAL {
    ?city wdt:P131 ?admin1 .
    ?admin1 rdfs:label ?admin1Label .
    FILTER ( LANG( ?admin1Label ) = "en" )
  }
  OPTIONAL {
    ?city wdt:P131 ?admin1 .
    ?admin1 wdt:P131 ?admin2 .
    ?admin2 rdfs:label ?admin2Label .
    FILTER ( LANG( ?admin2Label ) = "en" )
  }
  OPTIONAL {
    ?city wdt:P856 ?website .
  }
  OPTIONAL {
    ?wikipedia schema:about ?city ; schema:inLanguage "en" ; schema:isPartOf <https://en.wikipedia.org/> .
  }
  ?city wdt:P625 ?coord .
}
ORDER BY ?city
LIMIT 5

Can you list cities in India near coordinates 82°E, 27°N, along with their official websites, images, and English Wikipedia links?

Show me five Indian cities with their top two administrative levels, a photo from Wikimedia Commons, and a link to their English Wikipedia article.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3Label ?var4 ?var5 ?var6 ?var7 ?var8 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q515> . SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var6 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(82 27)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "100". <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#distance> ?var8 . } FILTER ( ( ( ?var8 > "2"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var4 . } { ?var1 <http://www.wikidata.org/prop/direct/P131> ?var3 . } { ?var3 <http://www.wikidata.org/prop/direct/P131> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P856> ?var7 . } OPTIONAL { ?var5 <http://schema.org/about> ?var1 . ?var5 <http://schema.org/inLanguage> "en". ?var5 <http://schema.org/isPartOf> <https://en.wikipedia.org/> . } } ORDER BY ASC( ?var1 ) LIMIT 5


Question: What is the political system of Thailand, and what image represents it?

SELECT DISTINCT ?politicalSystem ?politicalSystemLabel ?inception ?coordinates ?image WHERE { ?politicalSystem wdt:P31 wd:Q28108 . ?politicalSystem wdt:P17 wd:Q869 . OPTIONAL { ?politicalSystem wdt:P571 ?inception . } OPTIONAL { ?politicalSystem wdt:P625 ?coordinates . } OPTIONAL { ?politicalSystem wdt:P18 ?image . } ?politicalSystem rdfs:label ?politicalSystemLabel . FILTER(LANG(?politicalSystemLabel) = "en") } LIMIT 1000

Can you show me details about Thailand’s political system, including its founding date, location coordinates, and an associated image?

Tell me about the political system in Thailand: what is it called, and is there a picture, founding date, or location associated with it?

SELECT DISTINCT ?var1 ?var2Label ?var3 ?var4 ?var5 ?var6 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1969240> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q869> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P571> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var5 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var6 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } LIMIT 1000


Question: Most common properties used to link items to the Odia language.

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?propertyItem ( COUNT( DISTINCT ?item ) AS ?count ) WHERE {
  ?item ?directProperty wd:Q33810 .
  ?propertyItem wikibase:directClaim ?directProperty .
}
GROUP BY ?propertyItem
ORDER BY DESC ( ?count )

Which properties are most frequently used to associate entities with the Odia language, and how many items use each?

Show me the properties that connect items to the Odia language, ranked by how many items they are used with.

SELECT ?var1 ( COUNT ( DISTINCT ?var2 ) AS ?var3 ) WHERE { ?var2 ?var4 <http://www.wikidata.org/entity/Q33810> . ?var1 <http://wikiba.se/ontology#directClaim> ?var4 . } GROUP BY ?var1 ORDER BY DESC( ?var3 )


Question: Cities with population over 500,000, their coordinates, and population numbers

SELECT ?city ?cityLabel ?coordinates ?population WHERE { ?city (wdt:P31/wdt:P279*) wd:Q515 ; wdt:P625 ?coordinates ; wdt:P1082 ?population . FILTER(?population >= 500000) }

What are the cities with a population of at least 500,000, along with their geographic coordinates and population figures?

List all cities with more than half a million residents, including their locations and population counts.

SELECT ?var1 ?var1Label ( SAMPLE ( ?var2 ) AS ?var2 ) ?var3 ( SAMPLE ( ?var4 ) AS ?var4 ) WHERE { BIND ( IF ( ( ?var3 < "1000000"^^<http://www.w3.org/2001/XMLSchema#integer> ), "<1M", IF ( ( ?var3 < "2000000"^^<http://www.w3.org/2001/XMLSchema#integer> ), "1M-2M", IF ( ( ?var3 < "5000000"^^<http://www.w3.org/2001/XMLSchema#integer> ), "2M-5M", IF ( ( ?var3 < "10000000"^^<http://www.w3.org/2001/XMLSchema#integer> ), "5M-10M", IF ( ( ?var3 < "20000000"^^<http://www.w3.org/2001/XMLSchema#integer> ), "10M-20M", ">20M" ) ) ) ) ) AS ?var4 ). ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q515> ; <http://www.wikidata.org/prop/direct/P625> ?var2 ; <http://www.wikidata.org/prop/direct/P1082> ?var3 . FILTER ( ( ( ?var3 >= "500000"^^<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". } } GROUP BY ?var1 ?var1Label ?var3


Question: What are cities with a population of at least 150,000, along with their coordinates, population, and whether their population is between 10M and 20M or over 20M?

SELECT DISTINCT ?city ?cityLabel ?coordinate ?population ?populationCategory WHERE { ?city (wdt:P31/wdt:P279*) wd:Q515 ; wdt:P625 ?coordinate ; wdt:P1082 ?population ; rdfs:label ?cityLabel . FILTER(?population >= 150000 && lang(?cityLabel) = "en") BIND(IF(?population < 20000000, "10M-20M", ">20M") AS ?populationCategory) } LIMIT 10

List cities that are instances of or subclasses of city, have a population over 150,000, and show their location, population size, and a category (10M-20M or >20M).

Show me cities with populations above 150,000, including their names, geographic coordinates, population numbers, and whether they have a population under 20 million or more.

SELECT DISTINCT ?var1 ?var1Label ( SAMPLE ( ?var2 ) AS ?var2 )( MAX ( ?var3 ) AS ?var3 )( SAMPLE ( ?var4 ) AS ?var4 ) WHERE { BIND ( IF ( ( ?var3 < "20000000"^^<http://www.w3.org/2001/XMLSchema#integer> ), "10M-20M", ">20M" ) AS ?var4 ). ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q515> ; <http://www.wikidata.org/prop/direct/P625> ?var2 ; <http://www.wikidata.org/prop/direct/P1082> ?var3 . FILTER ( ( ( ?var3 >= "150000"^^<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". } } GROUP BY ?var1 ?var1Label


Question: What are the hierarchical categories above the bel unit in the classification of quantities?

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 ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label WHERE {
  wd:Q50098 wdt:P31 ?var1 .
  ?var1 wdt:P279 ?var2 .
  ?var2 wdt:P279 ?var3 .
  ?var3 wdt:P279 * wd:Q309314 .
  ?var1 rdfs:label ?var1Label .
  ?var2 rdfs:label ?var2Label .
  ?var3 rdfs:label ?var3Label .
  FILTER(LANG(?var1Label) = "en")
  FILTER(LANG(?var2Label) = "en")
  FILTER(LANG(?var3Label) = "en")
}

Show the chain of classes from the bel unit up to quantity, including its immediate and second-level superclasses.

What types of quantities does the bel unit belong to, and what broader categories do those types fall under?

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label WHERE { VALUES ( ?var4 ) { ( <http://www.wikidata.org/entity/Q47574> ) ( <http://www.wikidata.org/entity/Q309314> ) } BIND ( <http://www.wikidata.org/entity/Q50098> AS ?var5 ). ?var5 ( <http://www.wikidata.org/prop/direct/P31> | <http://www.wikidata.org/prop/direct/P279> ) ?var1 . ?var1 <http://www.wikidata.org/prop/direct/P279> * ?var4 . ?var2 ^ <http://www.wikidata.org/prop/direct/P279> * ?var1 . ?var3 ^ <http://www.wikidata.org/prop/direct/P279> ?var2 . ?var3 <http://www.wikidata.org/prop/direct/P279> * ?var4 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de, en". } }


Question: Units and their equivalent values in SI units

SELECT ?unit ?unitLabel ?siValue WHERE { ?unit wdt:P2370 ?siValue . ?unit rdfs:label ?unitLabel . FILTER(LANG(?unitLabel) = "en") } LIMIT 1000

What are the English names of units and their corresponding values in coherent SI units?

Show me a list of units along with their conversions to SI base or coherent units in English.

SELECT ?var1 ?var1Label ?var2 ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2370> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } LIMIT 1000


Question: Units with SI conversions but no defined physical quantity

SELECT ?unit ?unitLabel ?siEquivalent WHERE { ?unit wdt:P2370 ?siEquivalent . FILTER (NOT EXISTS { ?unit wdt:P111 [] }) ?unit rdfs:label ?unitLabel . } LIMIT 1000

Which units have a known equivalent in SI units but are not used to measure any physical property?

List all units that can be converted to SI units but are not classified as measuring any physical quantity.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var3Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2370> ?var3 . FILTER ( ( NOT EXISTS { ?var1 <http://www.wikidata.org/prop/direct/P111> [] . } ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv,en". } } LIMIT 1000


Question: What are the most detailed locations within 1.4 km of latitude 52 and longitude 0?

SELECT ?item ?itemLabel ?lat ?long WHERE { ?item p:P625/psv:P625/wikibase:geoLatitude ?lat ; p:P625/psv:P625/wikibase:geoLongitude ?long . FILTER(?lat >= 51.9874 && ?lat <= 52.0126) FILTER(?long >= -0.0205 && ?long <= 0.0205) ?item ?prop ?value . OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") } } GROUP BY ?item ?itemLabel ?lat ?long ORDER BY DESC(COUNT(?prop)) LIMIT 20

Which places near London (52°N, 0°E) have the most information on Wikidata, and what are their coordinates?

Show me the top 20 locations within 1.4 kilometers of (0, 52), ordered by how much information is available about them on Wikidata, along with their names and geographic coordinates.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { ?var1 ?var4 ?var5 . ?var1 <http://www.wikidata.org/prop/P625> ?var6 ; <http://www.wikidata.org/prop/P625> [ <http://www.wikidata.org/prop/statement/P625> ?var7 ; <http://www.wikidata.org/prop/statement/value/P625> [ <http://wikiba.se/ontology#geoLongitude> ?var3 ; <http://wikiba.se/ontology#geoLatitude> ?var2 ] ] . SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var8 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(0 52)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "1.408197271973957". } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var1Label ?var2 ?var3 ORDER BY DESC(COUNT ( ?var4 )) LIMIT 20


Question: What are some locations within approximately 22 kilometers of 22°E and 38°N?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
SELECT ?item ?coord WHERE {
  ?item wdt:P625 ?coord .
  FILTER ( ?coord >= "POINT(21.8 37.8)" ^^ geo:wktLiteral && ?coord <= "POINT(22.2 38.2)" ^^ geo:wktLiteral )
}
LIMIT 10

Show me places with coordinates near the point (22, 38), within a small geographic range.

List entities located in the region around 22 degrees east and 38 degrees north.

SELECT ?var1 ?var2 WHERE { SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(22 38)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "15". } }


Question: Cities in the United Kingdom

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 ?city ?cityLabel WHERE {
  ?city wdt:P31 wd:Q515 .
  ?city wdt:P17 wd:Q145 .
  ?city rdfs:label ?cityLabel .
  FILTER ( LANG( ?cityLabel ) = "en" )
}
LIMIT 100

What are the cities in the United Kingdom?

List the English names of all cities in the United Kingdom.

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


Question: Cities in the United Kingdom with their coordinates and administrative regions.

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 ?city ?cityLabel ?coordinates ?adminArea WHERE {
  ?city wdt:P31 wd:Q515 .
  ?city wdt:P17 wd:Q145 .
  OPTIONAL {
    ?city wdt:P625 ?coordinates .
  }
  OPTIONAL {
    ?city wdt:P131 ?adminArea .
  }
  OPTIONAL {
    ?city rdfs:label ?cityLabel .
    FILTER ( LANG( ?cityLabel ) = "en" )
  }
}

What are the cities in the United Kingdom, their geographic coordinates, and the administrative areas they belong to?

Please list all cities in the United Kingdom along with their coordinates and the administrative territories they are part of, including their English names.

SELECT ?var1 ?var2 ?var3 ?var3Label ?var4 ?var4Label WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q515> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q145> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P17> ?var3 . } OPTIONAL { } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P131> ?var4 . } }


Question: What are the top 10 countries with the highest combined population of all their cities?

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 ?country ?countryLabel(SUM(?population) AS ?totalPopulation) WHERE {
  ?city wdt:P31 / wdt:P279 * wd:Q515 ; wdt:P17 ?country ; wdt:P1082 ?population .
  ?country rdfs:label ?countryLabel .
  FILTER(LANG(?countryLabel) = "en")
}
GROUP BY ?country ?countryLabel
ORDER BY DESC(?totalPopulation)
LIMIT 10

Which countries have the largest total urban populations, based on the sum of all city populations in Wikidata?

Show me the countries where the sum of city populations is the greatest, ranked from highest to lowest.

SELECT ?var1 ?var1Label ( MAX ( ?var2 ) AS ?var3 ) WHERE { ?var4 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q515> ; <http://www.wikidata.org/prop/direct/P17> ?var1 ; <http://www.wikidata.org/prop/direct/P1082> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var1Label ORDER BY DESC( ?var3 ) LIMIT 10


Question: What are some cities in the United Kingdom?

SELECT ?city WHERE { ?city wdt:P31 wd:Q515 . ?city wdt:P131* wd:Q145 } LIMIT 10

List 10 cities located in the UK according to Wikidata.

Which places classified as cities are part of the United Kingdom?

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q515> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q6256> . } LIMIT 10


Question: Most used property to classify German administrative divisions

SELECT ?property (COUNT(?item) AS ?count) WHERE { ?item ?propertyUsed wd:Q387917 . ?property wikibase:directClaim ?propertyUsed . ?property rdf:type wikibase:Property . } GROUP BY ?property ORDER BY DESC(?count) LIMIT 1

Which property is most commonly used to indicate that an entity is a subclass of administrative divisions of Germany?

Show me the property that links the most types of German administrative divisions to the category "administrative divisions of Germany".

SELECT ?var1 ( COUNT ( ?var1 ) AS ?var2 ) WHERE { { SELECT ?var1 WHERE { ?var3 ?var4 <http://www.wikidata.org/entity/Q387917> . ?var1 <http://wikiba.se/ontology#directClaim> ?var4 . ?var1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . } LIMIT 10000 } } GROUP BY ?var1 ORDER BY DESC( ?var2 ) LIMIT 1


Question: Top 20 well-documented geographic features near latitude 52 and longitude 0, with their coordinates and labels.

SELECT ?item ?itemLabel ?lat ?lon WHERE { ?item wdt:P625 ?location . BIND(geof:latitude(?location) AS ?lat) BIND(geof:longitude(?location) AS ?lon) FILTER(?lat >= 51.99366 && ?lat <= 52.00634) FILTER(?lon >= -0.0103 && ?lon <= 0.0103) ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") ?item ?p ?o . } GROUP BY ?item ?itemLabel ?lat ?lon ORDER BY DESC(COUNT(?p)) LIMIT 20

What are the most detailed geographic locations near the coordinates 0° longitude and 52° latitude, and what are their names and exact coordinates?

List up to 20 notable places near the North Sea coast (around 52°N, 0°E), showing their English names, latitude, longitude, and sorted by how much information is available about them in Wikidata.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { ?var1 ?var4 ?var5 . ?var1 <http://www.wikidata.org/prop/P625> ?var6 ; <http://www.wikidata.org/prop/P625> [ <http://www.wikidata.org/prop/statement/P625> ?var7 ; <http://www.wikidata.org/prop/statement/value/P625> [ <http://wikiba.se/ontology#geoLongitude> ?var3 ; <http://wikiba.se/ontology#geoLatitude> ?var2 ] ] . SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var8 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(0 52)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "0.7038958705310917". } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var1Label ?var2 ?var3 ORDER BY DESC(COUNT ( ?var4 )) LIMIT 20


Question: What are the units of measurement and quantities in Wikidata?

SELECT DISTINCT ?item ?itemLabel ?class ?classLabel WHERE {  VALUES ?class { wd:Q47574 wd:Q309314 }  ?item (wdt:P31 | wdt:P279) ?class .  ?item rdfs:label ?itemLabel .  ?class rdfs:label ?classLabel .  FILTER(LANG(?itemLabel) = "en")  FILTER(LANG(?classLabel) = "en")}

Which items are instances or subclasses of units of measurement or quantities?

List all known units of measurement and quantities along with their labels.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label WHERE { VALUES ( ?var3 ) { ( <http://www.wikidata.org/entity/Q47574> ) ( <http://www.wikidata.org/entity/Q309314> ) } BIND ( <http://www.wikidata.org/entity/Q72900> AS ?var1 ). ?var2 ( <http://www.wikidata.org/prop/direct/P31> | <http://www.wikidata.org/prop/direct/P279> ) ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de, en". } }


Question: What are the coordinates of London?

SELECT ?coordinates WHERE { ?london rdfs:label "London" @en ; wdt:P31/wdt:P279* wd:Q515 ; wdt:P17 wd:Q145 ; wdt:P625 ?coordinates . }

Where is London located in terms of latitude and longitude?

Can you tell me the geographic coordinates of the capital city of the United Kingdom?

SELECT ?var1 WHERE { ?var2 <http://www.w3.org/2000/01/rdf-schema#label> "England"@en ; <http://www.wikidata.org/prop/direct/P17> ?var3 . ?var4 <http://www.w3.org/2000/01/rdf-schema#label> "London"@en ; ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/486972> ; <http://www.wikidata.org/prop/direct/P17> ?var3 ; <http://www.wikidata.org/prop/direct/P625> ?var1 . }


Question: What are the human settlements named "Stirling" in the United Kingdom, along with their descriptions and geographic 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/>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?description ?coord WHERE {
  ?item wdt:P31 / wdt:P279 * wd:Q486972 .
  ?item wdt:P17 wd:Q145 .
  ?item rdfs:label ?itemLabel .
  FILTER(LANG(?itemLabel) = "en")
  FILTER(CONTAINS(LCASE(?itemLabel) , "stirling"))
  OPTIONAL {
    ?item schema:description ?description .
    FILTER(LANG(?description) = "en")
  }
  ?item wdt:P625 ?coord .
}
ORDER BY ?itemLabel

Can you list the cities, towns, or villages called Stirling in the UK and tell me where they are located?

Show me the English descriptions and locations of all places in the UK with "Stirling" in their name that are classified as human settlements.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 WHERE { VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q1432101> ) ( <http://www.wikidata.org/entity/Q182923> ) ( <http://www.wikidata.org/entity/Q217838> ) ( <http://www.wikidata.org/entity/Q228569> ) ( <http://www.wikidata.org/entity/Q16883856> ) ( <http://www.wikidata.org/entity/Q2973853> ) ( <http://www.wikidata.org/entity/Q988375> ) ( <http://www.wikidata.org/entity/Q7617554> ) ( <http://www.wikidata.org/entity/Q21923522> ) ( <http://www.wikidata.org/entity/Q7617549> ) ( <http://www.wikidata.org/entity/Q29175326> ) ( <http://www.wikidata.org/entity/Q33495894> ) ( <http://www.wikidata.org/entity/Q3973610> ) ( <http://www.wikidata.org/entity/Q7617548> ) ( <http://www.wikidata.org/entity/Q16933126> ) ( <http://www.wikidata.org/entity/Q25114210> ) ( <http://www.wikidata.org/entity/Q7617547> ) ( <http://www.wikidata.org/entity/Q7617555> ) ( <http://www.wikidata.org/entity/Q2350325> ) ( <http://www.wikidata.org/entity/Q7617553> ) ( <http://www.wikidata.org/entity/Q29045067> ) ( <http://www.wikidata.org/entity/Q186212> ) ( <http://www.wikidata.org/entity/Q172728> ) ( <http://www.wikidata.org/entity/Q470877> ) ( <http://www.wikidata.org/entity/Q756268> ) ( <http://www.wikidata.org/entity/Q963530> ) ( <http://www.wikidata.org/entity/Q347945> ) ( <http://www.wikidata.org/entity/Q80918> ) ( <http://www.wikidata.org/entity/Q282126> ) ( <http://www.wikidata.org/entity/Q1306532> ) ( <http://www.wikidata.org/entity/Q115591> ) ( <http://www.wikidata.org/entity/Q1884981> ) ( <http://www.wikidata.org/entity/Q1229763> ) ( <http://www.wikidata.org/entity/Q606236> ) ( <http://www.wikidata.org/entity/Q4483203> ) ( <http://www.wikidata.org/entity/Q334215> ) ( <http://www.wikidata.org/entity/Q737072> ) ( <http://www.wikidata.org/entity/Q975320> ) ( <http://www.wikidata.org/entity/Q3913619> ) ( <http://www.wikidata.org/entity/Q22400657> ) ( <http://www.wikidata.org/entity/Q1748147> ) ( <http://www.wikidata.org/entity/Q2038735> ) ( <http://www.wikidata.org/entity/Q22400637> ) ( <http://www.wikidata.org/entity/Q21955626> ) ( <http://www.wikidata.org/entity/Q21896479> ) ( <http://www.wikidata.org/entity/Q21882855> ) ( <http://www.wikidata.org/entity/Q21948691> ) ( <http://www.wikidata.org/entity/Q21949199> ) ( <http://www.wikidata.org/entity/Q2383134> ) ( <http://www.wikidata.org/entity/Q21937523> ) } ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q486972> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P131> * ?var4 . } FILTER ( ( ( ?var4 = <http://www.wikidata.org/entity/Q145> ) ) ) . 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> "[AUTO_LANGUAGE],en". } ?var1 <http://www.wikidata.org/prop/direct/P625> ?var3 . }


Question: Inns in the United Kingdom

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

What are the names of inns located in the United Kingdom?

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


Question: Cities with population over 10 million, ordered by size.

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 ?var1 ?var1Label ?var2 WHERE {
  ?var1 wdt:P31 / wdt:P279 * wd:Q515 .
  ?var1 wdt:P1082 ?var2 .
  ?var1 rdfs:label ?var1Label .
  FILTER(LANG(?var1Label) = "en")
  .
  FILTER(?var2 > 10000000)
}
ORDER BY DESC(?var2)

Which cities have a population greater than 10 million, and what are their populations?

List all cities (including subtypes like metropolises) with a population above 10 million, showing their English names and exact population figures, sorted from largest to smallest.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { BIND ( <http://www.wikidata.org/entity/Q515> AS ?var3 ). ?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 . FILTER ( ( ( ?var2 > "10000000"^^<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". } } ORDER BY DESC( ?var2 )


Question: List places with population over 1 million and their source URLs.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prov: <http://www.w3.org/ns/prov#>
SELECT ?item ?population ?url WHERE {
  ?item wdt:P1082 ?population .
  ?statement ps:P1082 ?population ; prov:wasDerivedFrom ?ref .
  ?ref pr:P854 ?url .
  FILTER(?population > 1000000)
}
LIMIT 5

Which cities or regions have a population greater than one million, and what are the sources of this data?

Show me entities with a population exceeding one million along with the web URLs used as references for those population figures.

SELECT DISTINCT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/qualifier/P854> ?var3 . FILTER ( ( ( ?var4 > "1000000"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . }


Question: Entities with coordinates within 15 km of Thessaloniki, Greece

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
SELECT ?item ?coord WHERE {
  ?item wdt:P625 ?coord .
  FILTER(geof:latitude(?coord) >= 38.865 && geof:latitude(?coord) <= 39.135)
  FILTER(geof:longitude(?coord) >= 20.865 && geof:longitude(?coord) <= 21.135)
}

What places are located within 15 kilometers of the coordinates 21°E, 39°N?

List all geographic entities and their coordinates that fall within a 15 km radius of the point (21, 39), which is near Thessaloniki in northern Greece.

SELECT ?var1 ?var2 WHERE { SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(21 39)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "15". } }


Question: List all locations within 15 kilometers of latitude 46 and longitude -84.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?item ?location WHERE {
  ?item wdt:P625 ?location .
  FILTER(STRSTARTS(STR(?location) , "POINT("))
  BIND(STRBEFORE(STRAFTER(STR(?location) , "POINT(") , ")") AS ?coords)
  BIND(STRBEFORE(?coords , " ") AS ?lonStr)
  BIND(STRAFTER(?coords , " ") AS ?latStr)
  BIND(xsd:double(?lonStr) AS ?lon)
  BIND(xsd:double(?latStr) AS ?lat)
  FILTER(?lon >= -84.1945 && ?lon <= -83.8055 && ?lat >= 45.865 && ?lat <= 46.135)
}

What places are located within a 15-kilometer radius of the point (-84, 46)?

Show me the geographic items near (-84, 46) that are no more than 15 km away.

SELECT ?var1 ?var2 WHERE { SERVICE <http://wikiba.se/ontology#around> { ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#center> "POINT(-84 46)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#radius> "15". } }


Question: What are the provinces of the Republic of Artsakh?

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 ?province ?provinceLabel WHERE {
  ?province wdt:P31 wd:Q17379685 .
  ?province rdfs:label ?provinceLabel .
  FILTER ( LANG( ?provinceLabel ) = "en" )
}

Which administrative provinces were part of the Republic of Artsakh?

List the English names of all provinces that were part of the Republic of Artsakh.

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


Question: Types of Roman Catholic Diocese of Saint-Denis-de-La Réunion, its location, coordinates, and date.

SELECT DISTINCT ?type ?typeLabel ?administrativeEntity ?coordinates ?pointInTime WHERE { wd:Q875315 wdt:P31 ?type . OPTIONAL { wd:Q875315 wdt:P131 ?administrativeEntity . } OPTIONAL { wd:Q875315 wdt:P625 ?coordinates . } OPTIONAL { wd:Q875315 wdt:P585 ?pointInTime . } OPTIONAL { ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel) = "en") } }

What types of Catholic ecclesiastical entities is the Diocese of Saint-Denis-de-La Réunion classified as, and where is it located, what are its coordinates, and when was this information recorded?

List the classifications of the Roman Catholic Diocese of Saint-Denis-de-La Réunion along with its administrative area, geographic coordinates, and point in time, if available.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 ?var4 WHERE { OPTIONAL { <http://www.wikidata.org/entity/Q875315> <http://www.wikidata.org/prop/direct/P31> ?var1 . } OPTIONAL { <http://www.wikidata.org/entity/Q875315> <http://www.wikidata.org/prop/direct/P131> ?var2 . } OPTIONAL { <http://www.wikidata.org/entity/Q875315> <http://www.wikidata.org/prop/direct/P625> ?var3 . } OPTIONAL { <http://www.wikidata.org/entity/Q875315> <http://www.wikidata.org/prop/direct/P585> ?var4 . } }


Question: Which of the listed places in Anglesey are human settlements (not archaeological sites) and located in the United Kingdom?

Among the 17 specific locations in Anglesey, which ones are villages or communities (not archaeological sites) and part of the United Kingdom?

Please identify the human settlements from this list of Anglesey locations, excluding archaeological sites, that are within the United Kingdom.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var2 . ?var2 <http://www.wikidata.org/prop/direct/P279> * <http://www.wikidata.org/entity/Q486972> . ?var1 <http://www.wikidata.org/prop/direct/P131> * ?var3 . MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q13406463> . } FILTER ( ( ?var3 IN ( <http://www.wikidata.org/entity/Q145> ) ) ) . FILTER ( ( ?var1 IN ( <http://www.wikidata.org/entity/Q628633> , <http://www.wikidata.org/entity/Q24818151> , <http://www.wikidata.org/entity/Q31845075> , <http://www.wikidata.org/entity/Q16103628> , <http://www.wikidata.org/entity/Q24183495> , <http://www.wikidata.org/entity/Q29497441> , <http://www.wikidata.org/entity/Q29497440> , <http://www.wikidata.org/entity/Q25706666> , <http://www.wikidata.org/entity/Q29485085> , <http://www.wikidata.org/entity/Q29497436> , <http://www.wikidata.org/entity/Q29484813> , <http://www.wikidata.org/entity/Q13132109> , <http://www.wikidata.org/entity/Q29497430> , <http://www.wikidata.org/entity/Q29497439> , <http://www.wikidata.org/entity/Q29485124> , <http://www.wikidata.org/entity/Q24182244> , <http://www.wikidata.org/entity/Q8871220> ) ) ) . }


Question: Countries from the list with cities over 250,000 population

SELECT DISTINCT ?countryLabel ?cityLabel WHERE {
  VALUES ?country {
    wd:Q16   # Canada
    wd:Q145  # United Kingdom
    wd:Q222  # Albania
    wd:Q30   # United States
    wd:Q884  # South Korea
    wd:Q34   # Sweden
    wd:Q27   # Ireland
    wd:Q668  # India
    wd:Q142  # France
  }
  ?city wdt:P17 ?country ;
        (wdt:P31/wdt:P279*) wd:Q515 ;
        wdt:P1082 ?population .
  FILTER (?population > 250000)
  ?country rdfs:label ?countryLabel .
  ?city rdfs:label ?cityLabel .
  FILTER(LANG(?countryLabel) = "en")
  FILTER(LANG(?cityLabel) = "en")
}

Which cities in Canada, the United Kingdom, Albania, the United States, South Korea, Sweden, Ireland, India, and France have populations greater than 250,000?

List all cities with more than 250,000 residents in Canada, the United Kingdom, Albania, the United States, South Korea, Sweden, Ireland, India, and France, along with their respective countries.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label ?var4 ?var4Label ?var5 ?var5Label WHERE { { VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q16> ) ( <http://www.wikidata.org/entity/Q145> ) ( <http://www.wikidata.org/entity/Q222> ) ( <http://www.wikidata.org/entity/Q30> ) ( <http://www.wikidata.org/entity/Q884> ) ( <http://www.wikidata.org/entity/Q34> ) ( <http://www.wikidata.org/entity/Q27> ) ( <http://www.wikidata.org/entity/Q668> ) ( <http://www.wikidata.org/entity/Q142> ) } ?var6 <http://www.wikidata.org/prop/direct/P17> ?var1 ; ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q515> ; <http://www.wikidata.org/prop/direct/P1082> ?var7 . FILTER ( ( ( ?var7 > "250000"^^<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". } }


Question: What country is Moscow located in?

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 ?adminEntity ?adminEntityLabel WHERE {
  wd:Q649 wdt:P131 + ?adminEntity .
  ?adminEntity rdfs:label ?adminEntityLabel .
  FILTER ( LANG( ?adminEntityLabel ) = "en" )
}

Administrative division containing Moscow

Show me the country that Moscow belongs to, in English

SELECT ?var1 ?var1Label WHERE { <http://www.wikidata.org/entity/Q649> <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> "en, ru". } }


Question: What are all the subclasses of "unit of measurement" and "quantity" in Wikidata?

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 ?class ?classLabel ?parent ?parentLabel WHERE {
  VALUES ?parent {
    wd:Q47574 wd:Q309314
  }
  ?class wdt:P279 * ?parent .
  ?class rdfs:label ?classLabel .
  ?parent rdfs:label ?parentLabel .
  FILTER ( LANG( ?classLabel ) = "en" ) FILTER ( LANG( ?parentLabel ) = "en" )
}
ORDER BY ?parent ?class

Can you list the classes that are subclasses of either "unit of measurement" or "quantity", along with their English labels?

Show me the hierarchy of concepts under "unit of measurement" and "quantity", including direct and indirect subclasses, in English.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label WHERE { VALUES ( ?var4 ) { ( <http://www.wikidata.org/entity/Q47574> ) ( <http://www.wikidata.org/entity/Q309314> ) } BIND ( <http://www.wikidata.org/entity/Q11706236> AS ?var5 ). ?var5 ( <http://www.wikidata.org/prop/direct/P31> ?| <http://www.wikidata.org/prop/direct/P279> ?) ?var1 . ?var1 ( <http://www.wikidata.org/prop/direct/P31> */ <http://www.wikidata.org/prop/direct/P279> *) ?var4 . ?var1 ( <http://www.wikidata.org/prop/direct/P31> */ <http://www.wikidata.org/prop/direct/P279> *) ?var2 . ?var2 ( <http://www.wikidata.org/prop/direct/P31> | <http://www.wikidata.org/prop/direct/P279> ) ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de, en". } }


Question: What are the coordinates of the Mckechnie Institute and Reading Rooms in Girvan, and what are the coordinates of the administrative area it belongs to?

SELECT ?buildingCoordinates ?administrativeAreaCoordinates WHERE { wd:Q17841383 wdt:P625 ?buildingCoordinates . OPTIONAL { wd:Q17841383 wdt:P131 ?administrativeArea . ?administrativeArea wdt:P625 ?administrativeAreaCoordinates . } }

Where is the Mckechnie Institute and Reading Rooms located, and where is the center of the administrative region it falls under?

Can you show me the geographic coordinates of the Mckechnie Institute and the town or council area it is in?

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/Q17841383> <http://www.wikidata.org/prop/direct/P625> ?var1 . OPTIONAL { <http://www.wikidata.org/entity/Q17841383> <http://www.wikidata.org/prop/direct/P131> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P625> ?var2 . } }


Question: What are the neighborhoods in Yaoundé and their 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 ?neighborhood ?neighborhoodLabel ?coordinates WHERE {
  ?neighborhood wdt:P31 wd:Q123705 .
  ?neighborhood wdt:P131 wd:Q3808 .
  ?neighborhood wdt:P625 ?coordinates .
  OPTIONAL {
    ?neighborhood rdfs:label ?neighborhoodLabel .
    FILTER(LANG(?neighborhoodLabel) = "en")
  }
}

Can you list the neighborhoods of Yaoundé, Cameroon, along with their geographic coordinates?

Show me the English names and locations of all neighborhoods in Yaoundé.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q123705> . ?var1 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q3808> . ?var1 <http://www.wikidata.org/prop/direct/625> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en,fr". } }


Question: Public art in Paris arrondissements and their names in French

SELECT ?var1 ?var2 WHERE { ?var3 wdt:P136 wd:Q557141 . ?var3 wdt:P131 ?var10 . ?var10 wdt:P131 wd:Q90 . ?var10 rdfs:label ?var2 . FILTER (LANG(?var2) = "fr") . BIND(REPLACE(?var2, " de Paris", "", "i") AS ?var1) } LIMIT 10

What are the French names of the arrondissements in Paris where public art is located, and what are their simplified names without "de Paris"?

Show me the French labels of the administrative divisions (like arrondissements) in Paris that contain public art, along with their names stripped of "de Paris".

SELECT ?var1 ?var2 WHERE { { ?var3 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q90> . } UNION { ?var3 ( <http://www.wikidata.org/prop/direct/P131> / <http://www.wikidata.org/prop/direct/P131> *) <http://www.wikidata.org/entity/Q90> . } ?var3 <http://www.wikidata.org/prop/direct/P136> <http://www.wikidata.org/entity/Q557141> . OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P170> ?var4 . ?var4 <http://www.w3.org/2000/01/rdf-schema#label> ?var5 . FILTER ( ( ( LANG ( ?var5 ) = "fr" ) ) ) . } OPTIONAL { { ?var3 <http://www.wikidata.org/prop/direct/P136> ?var6 . FILTER ( ( ( STR ( ?var6 ) != "string1" ) ) ) . } UNION { ?var3 <http://www.wikidata.org/prop/direct/P31> ?var6 . } ?var6 <http://www.w3.org/2000/01/rdf-schema#label> ?var7 . FILTER ( ( ( LANG ( ?var7 ) = "fr" ) ) ) . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P276> ?var8 . ?var8 <http://www.w3.org/2000/01/rdf-schema#label> ?var9 . FILTER ( ( ( LANG ( ?var9 ) = "fr" ) ) ) . } OPTIONAL { BIND ( REPLACE ( ?var2 , "string2", "$1", "si" ) AS ?var1 ). ?var3 <http://www.wikidata.org/prop/direct/P131> ?var10 . ?var10 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q90> . ?var10 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "fr" ) ) ) . } } LIMIT 10


Question: What properties are used to link other entities to Vox.com?

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

Which properties in Wikidata connect items to the news website Vox, and what do they mean in English?

Can you list the English labels and descriptions of all properties that have Vox as their object?

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/Q20877087> . ?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: Humans with French labels containing "nardot"

SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q5 . ?item rdfs:label ?label . FILTER(LANG(?label) = "fr") . FILTER(contains(lcase(?label), "nardot")) }

Who are the humans whose French name includes "nardot"?

List all humans whose French label contains the substring "nardot".

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> "nardot"@fr . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . }


Question: What are the geographic coordinates of Wrexham and the administrative area it belongs to?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?cityCoordinates ?adminAreaCoordinates WHERE {
  wd:Q496368 wdt:P625 ?cityCoordinates .
  OPTIONAL {
    wd:Q496368 wdt:P131 ?adminArea .
    ?adminArea wdt:P625 ?adminAreaCoordinates .
  }
}

Coordinates of Wrexham and its county borough

Show me the location of Wrexham and the location of the administrative region it is part of.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/Q496368> <http://www.wikidata.org/prop/direct/P625> ?var1 . OPTIONAL { <http://www.wikidata.org/entity/Q496368> <http://www.wikidata.org/prop/direct/P131> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P625> ?var2 . } }


Question: What are the geographic coordinates of Tredean, and what are the coordinates of the administrative area it is located in?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?buildingCoords ?administrativeAreaCoords WHERE {
  wd:Q17743431 wdt:P625 ?buildingCoords .
  OPTIONAL {
    wd:Q17743431 wdt:P131 ?adminArea .
    ?adminArea wdt:P625 ?administrativeAreaCoords .
  }
}

Coordinates of Tredean and its administrative location (Devauden).

Show me the location of Tredean and the location of the place it belongs to in Monmouthshire.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/Q17743431> <http://www.wikidata.org/prop/direct/P625> ?var1 . OPTIONAL { <http://www.wikidata.org/entity/Q17743431> <http://www.wikidata.org/prop/direct/P131> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P625> ?var2 . } }


Question: What are the immediate parent and grandparent classes of "unit of measurement" and "quantity" in Wikidata's taxonomy?

SELECT DISTINCT ?unit ?unitLabel ?parent ?parentLabel ?grandparent ?grandparentLabel WHERE {  VALUES ?unit { wd:Q47574 wd:Q309314 }  ?unit rdfs:label ?unitLabel .  ?unit wdt:P279 ?parent .  ?parent rdfs:label ?parentLabel .  ?parent wdt:P279 ?grandparent .  ?grandparent rdfs:label ?grandparentLabel .  FILTER(LANG(?unitLabel) = "en")  FILTER(LANG(?parentLabel) = "en")  FILTER(LANG(?grandparentLabel) = "en")}

Show me the hierarchy of "unit of measurement" and "quantity" by listing their direct superclass and the superclass of that superclass.

Can you list the parent and grandparent categories for units of measurement and quantities, along with their English labels?

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label WHERE { VALUES ( ?var4 ) { ( <http://www.wikidata.org/entity/Q47574> ) ( <http://www.wikidata.org/entity/Q309314> ) } BIND ( <http://www.wikidata.org/entity/Q18994451> AS ?var5 ). ?var5 ( <http://www.wikidata.org/prop/direct/P31> | <http://www.wikidata.org/prop/direct/P279> ) ?var1 . ?var1 <http://www.wikidata.org/prop/direct/P279> * ?var4 . ?var2 ^ <http://www.wikidata.org/prop/direct/P279> * ?var1 . ?var3 ^ <http://www.wikidata.org/prop/direct/P279> ?var2 . ?var3 <http://www.wikidata.org/prop/direct/P279> * ?var4 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de, en". } }


Question: Places in East Lothian with coordinates and types

SELECT DISTINCT ?place ?placeLabel ?coordinates ?image ?instance ?instanceLabel WHERE { ?place wdt:P131 wd:Q207257 . ?place wdt:P625 ?coordinates . OPTIONAL { ?place wdt:P18 ?image . } OPTIONAL { ?place wdt:P31 ?instance . } ?place rdfs:label ?placeLabel . FILTER(LANG(?placeLabel) = "en") . OPTIONAL { ?instance rdfs:label ?instanceLabel . FILTER(LANG(?instanceLabel) = "en") . }} ORDER BY ASC(?placeLabel) LIMIT 20

What are the places located in East Lothian, and what are their coordinates and instance types (e.g., house, tenement)?

Show me a list of places in East Lothian, including their geographic coordinates and whether they are houses, tenements, or other types of structures.

SELECT DISTINCT ?var1 ?var1Label ( SAMPLE ( ?var2 ) AS ?var2 )( SAMPLE ( ?var2Label ) AS ?var2Label )( SAMPLE ( ?var3 ) AS ?var3 )( SAMPLE ( ?var4 ) AS ?var4 ) ?var5 ?var5Label ?var6 ?var6Label ?var7 ?var7Label WHERE { <http://www.bigdata.com/queryHints#Query> <http://www.bigdata.com/queryHints#optimizer> "None". ?var2 <http://www.wikidata.org/prop/direct/P131> * <http://www.wikidata.org/entity/Q207257> . ?var1 <http://www.wikidata.org/prop/direct/P131> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var3 . ?var1 <http://www.wikidata.org/prop/P1435> ?var8 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var5 . } OPTIONAL { ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . FILTER ( ( LANG ( ?var2Label ) IN ( "en" ) ) ) . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P149> ?var6 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P84> ?var7 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } GROUP BY ?var1 ?var1Label ?var5 ?var5Label ?var6 ?var6Label ?var7 ?var7Label ORDER BY ASC( ?var1Label )


Question: List of communities in Wales with their English names and geographic coordinates.

PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wikibase: <http://wikiba.se/ontology#>
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 DISTINCT ?label ?lat ?long WHERE {
  ?community ( wdt:P31 / wdt:P279 * ) wd:Q2630741 .
  ?community p:P625 ?statement .
  ?statement psv:P625 ?geoValue .
  ?geoValue wikibase:geoLatitude ?lat .
  ?geoValue wikibase:geoLongitude ?long .
  OPTIONAL {
    ?community rdfs:label ?label .
    FILTER ( LANG( ?label ) = "en" )
  }
}
ORDER BY ASC ( ?label )

What are the English names, latitudes, and longitudes of all communities in Wales?

Can you provide the English labels, latitude, and longitude for every community in Wales, including its subclasses, ordered alphabetically by name?

SELECT DISTINCT ?var1 ?var2 ?var3 WHERE { ?var4 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q2630741> . ?var4 <http://www.wikidata.org/prop/direct/P625> ?var5 . ?var4 <http://www.wikidata.org/prop/P625> ?var6 . ?var6 <http://www.wikidata.org/prop/statement/value/P625> ?var7 . ?var7 <http://wikiba.se/ontology#geoLatitude> ?var2 . ?var7 <http://wikiba.se/ontology#geoLongitude> ?var3 . OPTIONAL { ?var4 <http://www.w3.org/2000/01/rdf-schema#label> ?var1 . FILTER ( ( ( LANG ( ?var1 ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( ?var1 )


Question: What are some items in Italy that have images and Commons categories?

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 ?item ?itemLabel ?image ?commonsCategory WHERE {
  ?item wdt:P17 wd:Q38 .
  FILTER ( STRSTARTS( STR( ?item ) , "http://www.wikidata.org/entity/Q" ) ) OPTIONAL {
    ?item wdt:P18 ?image .
  }
  OPTIONAL {
    ?item wdt:P373 ?commonsCategory .
  }
  ?item rdfs:label ?itemLabel .
  FILTER ( LANG( ?itemLabel ) = "en" )
}
LIMIT 3000

Show me items located in Italy along with their images and associated Wikimedia Commons categories.

Can you list items in Italy that have images and Commons categories, with their English labels?

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(42 12)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(44 13)"^^<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: What are the places in Serbia with their coordinates, images, Wikimedia Commons categories, and street addresses?

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 ?place ?placeLabel ?coord ?image ?commonsCategory ?address WHERE {
  ?place wdt:P625 ?coord .
  ?place wdt:P17 wd:Q222 .
  OPTIONAL {
    ?place wdt:P18 ?image .
  }
  OPTIONAL {
    ?place wdt:P373 ?commonsCategory .
  }
  OPTIONAL {
    ?place wdt:P969 ?address .
  }
  ?place rdfs:label ?placeLabel .
  FILTER(LANG(?placeLabel) = "en")
}
LIMIT 3000

Can you show me the names, locations, and media files of locations in Serbia?

List all entities in Serbia that have geographic coordinates and provide any available images, Commons categories, or addresses.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 ?var7 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(20 44)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(20 44)"^^<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 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P969> ?var7 . } 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: What are the English labels of properties that connect Kyiv to Ukraine?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?propertyLabel WHERE {
  wd:Q1899 ?directProperty wd:Q212 .
  ?propertyEntity wikibase:directClaim ?directProperty .
  ?propertyEntity rdfs:label ?propertyLabel .
  FILTER(LANG(?propertyLabel) = "en")
}

Which relationships exist between Kyiv and Ukraine in Wikidata?

How is Kyiv related to Ukraine according to Wikidata data?

SELECT ?var1 WHERE { <http://www.wikidata.org/entity/Q1899> ?var2 <http://www.wikidata.org/entity/Q212> . ?var3 ?var4 ?var2 . ?var3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var1 . FILTER ( ( ( LANG ( ?var1 ) = "en" ) ) ) . }