Question: Descendants of Attila the Hun up to 7 generations

SELECT DISTINCT ?descendant ?descendantLabel WHERE { { wd:Q36724 wdt:P40 ?descendant . } UNION { wd:Q36724 wdt:P40 ?gen1 . ?gen1 wdt:P40 ?descendant . } UNION { wd:Q36724 wdt:P40 ?gen1 . ?gen1 wdt:P40 ?gen2 . ?gen2 wdt:P40 ?descendant . } UNION { wd:Q36724 wdt:P40 ?gen1 . ?gen1 wdt:P40 ?gen2 . ?gen2 wdt:P40 ?gen3 . ?gen3 wdt:P40 ?descendant . } UNION { wd:Q36724 wdt:P40 ?gen1 . ?gen1 wdt:P40 ?gen2 . ?gen2 wdt:P40 ?gen3 . ?gen3 wdt:P40 ?gen4 . ?gen4 wdt:P40 ?descendant . } UNION { wd:Q36724 wdt:P40 ?gen1 . ?gen1 wdt:P40 ?gen2 . ?gen2 wdt:P40 ?gen3 . ?gen3 wdt:P40 ?gen4 . ?gen4 wdt:P40 ?gen5 . ?gen5 wdt:P40 ?descendant . } UNION { wd:Q36724 wdt:P40 ?gen1 . ?gen1 wdt:P40 ?gen2 . ?gen2 wdt:P40 ?gen3 . ?gen3 wdt:P40 ?gen4 . ?gen4 wdt:P40 ?gen5 . ?gen5 wdt:P40 ?gen6 . ?gen6 wdt:P40 ?descendant . } ?descendant rdfs:label ?descendantLabel . FILTER(LANG(?descendantLabel) = "en") }

Who are the children and descendants of Attila the Hun?

List all known descendants of Attila the Hun in English, up to seven generations deep.

SELECT ?var1 ?var1Label ?var2 WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q36724> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "7"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P40> . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P40> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Chinese-labeled publisher organizations in Wikidata

SELECT ?publisher ?label ?description WHERE { ?publisher wdt:P31 wd:Q2085381 . ?publisher rdfs:label ?label . FILTER(LANG(?label) = "zh") . OPTIONAL { ?publisher schema:description ?description . FILTER(LANG(?description) = "zh") } } LIMIT 100

Which publisher organizations have Chinese labels and descriptions?

Show me publisher organizations with Chinese names and descriptions.

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


Question: Images of the person with SNAC ARK ID w6nz9dg1

SELECT ?image WHERE {
  ?item wdt:P3430 "w6nz9dg1" .
  OPTIONAL {
    ?item wdt:P18 ?image .
  }
}

What images are linked to the entity identified by the SNAC ARK ID w6nz9dg1?

Can you show me the Wikimedia Commons images linked to the Social Networks and Archival Context (SNAC) identifier w6nz9dg1?

SELECT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P3430> "w6nz9dg1". OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . } }


Question: Basque female given names and their masculine equivalents

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 ?femaleName ?femaleNameLabel ?equivalentName ?equivalentNameLabel WHERE {
  ?femaleName wdt:P31 wd:Q11879590 ; wdt:P1705 ?femaleNameLabel .
  FILTER ( LANG( ?femaleNameLabel ) = "eu" ) OPTIONAL {
    ?femaleName wdt:P460 ?equivalentName .
    ?equivalentName rdfs:label ?equivalentNameLabel .
    FILTER ( LANG( ?equivalentNameLabel ) = "en" )
  }
}

What are the female given names in the Basque language, and what are their male counterparts?

List all female given names in Basque along with their possible masculine equivalents in English.

SELECT ?var1 ?var1Label ?var2Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11879590> . ?var1 <http://www.wikidata.org/prop/direct/P407> <http://www.wikidata.org/entity/Q8752> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P460> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "es,cat,en,es". } }


Question: Find two different people who were born and died on the same dates.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?person1 ?person2 ?birth ?death WHERE {
  ?person1 wdt:P569 ?birth ; wdt:P570 ?death .
  ?person2 wdt:P569 ?birth ; wdt:P570 ?death .
  FILTER ( ?person1 != ?person2 )
}
LIMIT 1

Are there any two distinct individuals in history who share both their birth and death dates?

Show me an example of two people who were born and died on identical dates.

SELECT ?var1 ?var2 ?var3 ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/P569> [ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#BestRank> ; <http://www.wikidata.org/prop/statement/value/P569> [ <http://wikiba.se/ontology#timeValue> ?var3 ; <http://wikiba.se/ontology#timePrecision> "11"^^<http://www.w3.org/2001/XMLSchema#integer> ] ] ; <http://www.wikidata.org/prop/P570> [ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#BestRank> ; <http://www.wikidata.org/prop/statement/value/P570> [ <http://wikiba.se/ontology#timeValue> ?var4 ; <http://wikiba.se/ontology#timePrecision> "11"^^<http://www.w3.org/2001/XMLSchema#integer> ] ] . ?var2 <http://www.wikidata.org/prop/P569> [ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#BestRank> ; <http://www.wikidata.org/prop/statement/value/P569> [ <http://wikiba.se/ontology#timeValue> ?var3 ; <http://wikiba.se/ontology#timePrecision> "11"^^<http://www.w3.org/2001/XMLSchema#integer> ] ] ; <http://www.wikidata.org/prop/P570> [ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#BestRank> ; <http://www.wikidata.org/prop/statement/value/P570> [ <http://wikiba.se/ontology#timeValue> ?var4 ; <http://wikiba.se/ontology#timePrecision> "11"^^<http://www.w3.org/2001/XMLSchema#integer> ] ] . FILTER ( ( ( ?var1 != ?var2 ) ) ) . } LIMIT 1


Question: Items in northern Italy between longitude 11–12°E and latitude 44–45°N with their coordinates, images, Commons categories, and addresses.

SELECT ?item ?itemLabel ?coord ?image ?commonsCategory ?address WHERE { ?item wdt:P625 ?coord . FILTER(geof:longitude(?coord) >= 11 && geof:longitude(?coord) <= 12) FILTER(geof:latitude(?coord) >= 44 && geof:latitude(?coord) <= 45) OPTIONAL { ?item wdt:P18 ?image . } OPTIONAL { ?item wdt:P373 ?commonsCategory . } OPTIONAL { ?item wdt:P969 ?address . } ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") } LIMIT 3000

What places in the region around Bologna, Italy, have coordinates, images, Wikimedia Commons categories, and street addresses listed in Wikidata?

Please list up to 3000 locations in the geographic area bounded by 11–12°E and 44–45°N, showing their English labels, coordinates, images, Commons categories, and addresses if available.

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(11 44)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(12 45)"^^<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 countries, continents, and administrative regions is the Ettlingen Line located in?

SELECT DISTINCT ?var1 WHERE { wd:Q1371834 (wdt:P30|wdt:P17|wdt:P131|wdt:P376|wdt:P501)+ ?var1 . } LIMIT 100

Find all geographic and political entities connected to the Ettlingen Line through its location relationships.

Which larger geographic areas include the Ettlingen Line, such as its country, region, and continent?

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q1371834> 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 works of art that have a location, an image on Wikimedia Commons, a Commons category, or an address?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?artwork ?artworkLabel ?location ?image ?commonsCategory ?address WHERE {
  ?artwork ( wdt:P31 / wdt:P279 * ) wd:Q838948 .
  OPTIONAL {
    ?artwork wdt:P625 ?location .
  }
  OPTIONAL {
    ?artwork wdt:P18 ?image .
  }
  OPTIONAL {
    ?artwork wdt:P373 ?commonsCategory .
  }
  OPTIONAL {
    ?artwork wdt:P969 ?address .
  }
}
LIMIT 3000

Show me works of art along with their coordinates, images, Wikimedia Commons categories, and street addresses, if available.

List works of art with their associated location, image, Commons category, and address — include all that have any of these details.

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(18 -34)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(18 -34)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . } ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q838948> . 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 is the English name and description of the entity with Great Russian Encyclopedia Online ID 1815421?

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

Find the English label and description for the entry in the Great Russian Encyclopedia with ID 1815421.

Which city is identified by the old Great Russian Encyclopedia Online ID 1815421, and what is its English description?

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


Question: Steve Buscemi movies and TV shows ordered by release year, with English and Ukrainian titles and Wikipedia links.

SELECT ?instanceTypeLabel (YEAR(MIN(?publicationDate)) AS ?year) ?ukLabel ?enLabel ?ukWikipedia ?enWikipedia WHERE { ?work wdt:P161 wd:Q104061 . ?work wdt:P577 ?publicationDate . ?work wdt:P31 ?instanceType . OPTIONAL { ?work rdfs:label ?ukLabel . FILTER(LANG(?ukLabel) = "uk") } ?work rdfs:label ?enLabel . FILTER(LANG(?enLabel) = "en") . ?enWikipedia schema:about ?work ; schema:inLanguage "en" ; schema:isPartOf <https://en.wikipedia.org/> . OPTIONAL { ?ukWikipedia schema:about ?work ; schema:inLanguage "uk" ; schema:isPartOf <https://uk.wikipedia.org/> . } } GROUP BY ?instanceTypeLabel ?ukLabel ?enLabel ?work ?ukWikipedia ?enWikipedia ORDER BY ASC(?year)

What are all the films and TV shows Steve Buscemi has appeared in, listed from earliest to latest, along with their English and Ukrainian titles and corresponding Wikipedia pages?

Please list all works featuring Steve Buscemi, sorted by release year, showing the English title, Ukrainian title (if available), and links to the English and Ukrainian Wikipedia articles.

SELECT ?var1Label ( YEAR ( MIN ( ?var2 ) ) AS ?var3 ) ?var4Label ?var5Label ?var6 ?var7 ?var8 WHERE { ?var9 <http://www.wikidata.org/prop/direct/P161> <http://www.wikidata.org/entity/Q104061> . ?var9 <http://www.wikidata.org/prop/direct/P577> ?var2 . ?var9 <http://www.wikidata.org/prop/direct/P31> ?var1 . OPTIONAL { ?var9 <http://www.w3.org/2000/01/rdf-schema#label> ?var4Label . FILTER ( ( ( LANG ( ?var4Label ) = "uk" ) ) ) . } ?var7 <http://schema.org/about> ?var9 . ?var7 <http://schema.org/inLanguage> "en". ?var7 <http://schema.org/isPartOf> <https://en.wikipedia.org/> . OPTIONAL { ?var6 <http://schema.org/about> ?var9 . ?var6 <http://schema.org/inLanguage> "uk". ?var6 <http://schema.org/isPartOf> <https://uk.wikipedia.org/> . } ?var9 <http://www.w3.org/2000/01/rdf-schema#label> ?var5Label . FILTER ( ( ( LANG ( ?var5Label ) = "en" ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "uk,en". } } GROUP BY ?var4Label ?var5Label ?var1Label ?var9 ?var6 ?var7 ?var8 ORDER BY ASC( ?var3 )


Question: What is the image of Charles La Trobe?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?image WHERE {
  ?item wdt:P3430 "w6dz0mn5" .
  OPTIONAL {
    ?item wdt:P18 ?image .
  }
}

Can you show me the Wikimedia Commons image associated with the SNAC ARK ID w6dz0mn5?

Show the portrait of the person identified by the SNAC ARK ID w6dz0mn5.

SELECT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P3430> "w6dz0mn5". OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . } }


Question: What are all the works authored by Benoît Prieur, along with their publication dates, types, venues, and co-authors, sorted by the earliest publication date first?

SELECT
  (MIN(?pubDate) AS ?earliestPublicationDate)
  ?work
  ?workLabel
  (GROUP_CONCAT(DISTINCT ?typeLabel; SEPARATOR=", ") AS ?workTypes)
  (SAMPLE(?numberOfPages) AS ?numberOfPagesSample)
  ?publicationVenue
  ?publicationVenueLabel
  (GROUP_CONCAT(DISTINCT ?authorLabel; SEPARATOR=", ") AS ?allAuthors)
WHERE {
  ?work wdt:P50 wd:Q42790984 .  # Work authored by Benoît Prieur

  # Get all authors of the work
  ?work wdt:P50 ?author .
  OPTIONAL {
    ?author rdfs:label ?authorLabelRaw .
    FILTER(LANG(?authorLabelRaw) = "en")
  }
  BIND(COALESCE(?authorLabelRaw, SUBSTR(STR(?author), 32)) AS ?authorLabel)

  # Get work types (P31)
  OPTIONAL {
    ?work wdt:P31 ?type .
    ?type rdfs:label ?typeLabel .
    FILTER(LANG(?typeLabel) = "en")
  }

  # Get publication date (P577)
  OPTIONAL {
    ?work wdt:P577 ?pubDateRaw .
    BIND(xsd:date(?pubDateRaw) AS ?pubDate)
  }

  # Get number of pages (P1104)
  OPTIONAL {
    ?work wdt:P1104 ?numberOfPages .
  }

  # Get publication venue (P1433)
  OPTIONAL {
    ?work wdt:P1433 ?publicationVenue .
    ?publicationVenue rdfs:label ?publicationVenueLabel .
    FILTER(LANG(?publicationVenueLabel) = "en")
  }
}
GROUP BY ?work ?workLabel ?publicationVenue ?publicationVenueLabel
ORDER BY DESC(?earliestPublicationDate)

Show me a list of articles, interviews, and other publications created by Benoît Prieur, including where they were published, how many pages they have, and who else contributed, ordered from newest to oldest.

Can you retrieve Benoît Prieur’s published works, their publication venues, types (like news article or interview), number of pages, and co-authors, grouped by work and sorted by earliest release date?

SELECT( MIN ( ?var1 ) AS ?var2 ) ?var3 ?var3Label ( GROUP_CONCAT ( DISTINCT ?var4Label ; SEPARATOR = ", " ) AS ?var5 )( SAMPLE ( ?var6 ) AS ?var7 ) ?var8 ?var8Label ( GROUP_CONCAT ( DISTINCT ?var9Label ; SEPARATOR = ", " ) AS ?var10 ) WHERE { ?var3 <http://www.wikidata.org/prop/direct/P50> <http://www.wikidata.org/entity/Q42790984> . ?var3 <http://www.wikidata.org/prop/direct/P50> ?var11 . OPTIONAL { ?var11 <http://www.w3.org/2000/01/rdf-schema#label> ?var12 . FILTER ( ( ( LANG ( ?var12 ) = "en" ) ) ) . } BIND ( COALESCE ( ?var12 , SUBSTR ( STR ( ?var11 ) ,"32"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) AS ?var9Label ). OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P31> ?var4 . ?var4 <http://www.w3.org/2000/01/rdf-schema#label> ?var4Label . FILTER ( ( ( LANG ( ?var4Label ) = "en" ) ) ) . } OPTIONAL { BIND ( <http://www.w3.org/2001/XMLSchema#date> ( ?var13 ) AS ?var1 ). ?var3 <http://www.wikidata.org/prop/direct/P577> ?var13 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P1104> ?var6 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P1433> ?var8 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,da,de,es,fr,jp,no,ru,sv,zh". } } GROUP BY ?var3 ?var3Label ?var8 ?var8Label ORDER BY DESC( ?var2 )


Question: What category do both Kabul and Pyongyang belong 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 ?commonType ?label WHERE {
  wd:Q5838 wdt:P31 ?commonType .
  wd:Q18808 wdt:P31 ?commonType .
  ?commonType rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}
ORDER BY ?label
LIMIT 1

What is the common type shared by the capitals of Afghanistan and North Korea?

Which class is both Kabul and Pyongyang an instance of?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q5838> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q18808> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What creative works were created by Danish citizens who died before or in 1947?

SELECT ?work ?creator ?deathDate WHERE { ?work wdt:P170 ?creator . ?creator wdt:P27 wd:Q756617 . ?creator wdt:P570 ?deathDate . FILTER (YEAR(?deathDate) <= 1947) } LIMIT 100

Can you list paintings or artworks made by people from the Kingdom of Denmark who passed away by 1947, along with their names and death dates?

Who were the artists from the historical Kingdom of Denmark that died before 1948, and what artworks are attributed to them?

SELECT * WHERE { ?var1 <http://www.wikidata.org/prop/direct/P170> ?var2 . ?var2 <http://www.wikidata.org/prop/direct/P27> <http://www.wikidata.org/entity/Q35> . ?var2 <http://www.wikidata.org/prop/direct/P570> ?var3 . FILTER ( ( ( YEAR ( ?var3 ) <= "1947"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . } LIMIT 100


Question: What are the top 10 cities where the most people have died of cancer, and how many died in each?

SELECT ?placeOfDeath ?coordinates ?causeLabel (COUNT(?person) AS ?count) WHERE { ?person wdt:P509 wd:Q12078 ; wdt:P20 ?placeOfDeath . ?placeOfDeath wdt:P625 ?coordinates . wd:Q12078 rdfs:label ?causeLabel . FILTER(LANG(?causeLabel) = "en") } GROUP BY ?placeOfDeath ?coordinates ?causeLabel ORDER BY DESC(?count) LIMIT 10

Show the locations with the highest number of cancer-related deaths, along with their coordinates and the total count.

Which cities have seen the most cancer deaths globally, and what are their geographic coordinates?

SELECT ?var1 ?var2 ?var3 ( COUNT ( ?var1 ) AS ?var4 ) ?var5 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P509> [ <http://www.w3.org/2000/01/rdf-schema#label> "string1"@en ] ; <http://www.w3.org/2001/XMLSchema#preflabel> ?var5 ; <http://www.wikidata.org/prop/direct/P20> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P625> ?var2 . } GROUP BY ?var1 ?var3 ?var2 ?var5


Question: What is the most specific ontological category that both François Hollande and Nigeria belong to through their types?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonAncestor WHERE {
  wd:Q157 wdt:P31 ?type1 .
  wd:Q1033 wdt:P31 ?type2 .
  ?type1 wdt:P279 * ?commonAncestor .
  ?type2 wdt:P279 * ?commonAncestor .
  FILTER(?commonAncestor != ?type1 && ?commonAncestor != ?type2)
}
ORDER BY ?commonAncestor
LIMIT 1

What do François Hollande and Nigeria have in common in terms of their highest shared category in the Wikidata hierarchy?

What is the common superclass of the categories that François Hollande and Nigeria are instances of?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q157> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q1033> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Most specific common superclass of Chinese Ministry of Foreign Affairs and South Korea

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonClass WHERE {
  wd:Q1155502 wdt:P31 ?type1 .
  ?type1 wdt:P279 * ?commonClass .
  wd:Q884 wdt:P31 ?commonClass .
  FILTER(?commonClass != wd:Q35120)
}
ORDER BY ASC(STRLEN(STR(?commonClass)))
LIMIT 1

What government category do both the Chinese Ministry of Foreign Affairs and South Korea belong to?

Find the most specific shared classification between the Chinese Ministry of Foreign Affairs and South Korea.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q1155502> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q884> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What properties are used to link the Association for Computing Machinery (ACM) to other items in Wikidata?

SELECT DISTINCT ?propertyItem ?propertyLabel ?propertyDescription WHERE { ?item ?prop wd:Q127992 . ?propertyItem wikibase:directClaim ?prop . ?propertyItem a wikibase:Property . ?propertyItem rdfs:label ?propertyLabel . ?propertyItem schema:description ?propertyDescription . FILTER (LANG(?propertyLabel) = "en") FILTER (LANG(?propertyDescription) = "en") } LIMIT 100

Which properties in Wikidata have the Association for Computing Machinery as their object, and what are their English labels and descriptions?

Show me the English labels and descriptions of all properties that are used to connect the Association for Computing Machinery to other entities in Wikidata.

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/Q127992> . ?var1 ?var6 ?var5 . ?var1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . } LIMIT 100 } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var1 <http://schema.org/description> ?var3 . FILTER ( ( ( LANG ( ?var2Label ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . } LIMIT 100


Question: What type do Brownsville and Tunis have in common?

SELECT ?commonType
WHERE {
  wd:Q51693 wdt:P31 ?commonType .
  wd:Q3572 wdt:P31 ?commonType .
}

Which category is shared by both Brownsville, Texas, and Tunis?

What is the most specific classification that applies to both Brownsville and Tunis?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q51693> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q3572> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Nigerian films with no director listed

SELECT ?film ?filmLabel WHERE { ?film wdt:P31 wd:Q11424 . ?film wdt:P17 wd:Q1033 . OPTIONAL { ?film wdt:P57 ?director . } FILTER ( !BOUND(?director) ) . ?film rdfs:label ?filmLabel . FILTER (LANG(?filmLabel) = "en") }

Which films from Nigeria do not have a director specified in Wikidata?

List Nigerian movies that are not associated with any director.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q1033> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P57> ?var2 . } FILTER ( ( !( BOUND ( ?var2 ) ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What is the most specific category that both Abuja and California belong to?

SELECT DISTINCT ?common WHERE { wd:Q3787 wdt:P31 ?class1 . wd:Q99 wdt:P31 ?class2 . ?class1 wdt:P279* ?common . ?class2 wdt:P279* ?common . FILTER(?common = wd:Q1048835) }

Which concept is a superclass of both a city like Abuja and a U.S. state like California?

What is the shared administrative classification between Nigeria's capital and the state of California?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q3787> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q99> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Abuja and Iceland belong to through their types?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonAncestor WHERE {
  VALUES ?type1 {
    wd:Q515 wd:Q1549591 wd:Q257391
  }
  VALUES ?type2 {
    wd:Q112099 wd:Q3624078 wd:Q6256
  }
  ?type1 wdt:P279 ?p1 .
  ?p1 wdt:P279 ?commonAncestor .
  ?type2 wdt:P279 ?p2 .
  ?p2 wdt:P279 ?commonAncestor .
}
LIMIT 1

What administrative category do the types of Abuja and Iceland have in common?

What is the common superclass one level above the types of Abuja and Iceland?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q3787> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q189> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Tunis and Baoding belong to?

SELECT ?common ?label
WHERE {
  wd:Q3572 wdt:P31 ?common .
  wd:Q58584 wdt:P31 ?common .
  ?common rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}

Which class is shared by both Tunis and Baoding as an instance?

What is the common type of Tunis and Baoding in Wikidata?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q3572> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q58584> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What are the English, German, French, and Italian labels, image, coordinates, and Wikipedia links for the Roero wine region?

SELECT ?label ?image ?coordinates ?wikipediaArticle WHERE { VALUES (?lang ?priority) { ("en" 1) ("de" 2) ("fr" 3) ("it" 4) } wd:Q19870 rdfs:label ?label . FILTER (LANG(?label) = ?lang) OPTIONAL { wd:Q19870 wdt:P18 ?image } OPTIONAL { wd:Q19870 wdt:P625 ?coordinates } ?wikipediaArticle schema:about wd:Q19870 ; schema:inLanguage ?lang ; schema:isPartOf ?site . FILTER (STRSTARTS(STR(?site), "https://") && STRENDS(STR(?site), ".wikipedia.org/")) } ORDER BY ?priority

Can you show me the label, image, geographic coordinates, and Wikipedia article for Roero in English, German, French, and Italian, ordered by language preference?

Please provide the Wikipedia links, image, and coordinates for Roero, along with its name in English, German, French, and Italian, sorted by language priority.

SELECT ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { OPTIONAL { <http://www.wikidata.org/entity/Q19870> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = ?var7 ) ) ) . VALUES ( ?var7 ?var8 ) { ( "undefined""1"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "en""2"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "de""3"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "fr""4"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "it""5"^^<http://www.w3.org/2001/XMLSchema#integer> ) } } OPTIONAL { <http://www.wikidata.org/entity/Q19870> <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { <http://www.wikidata.org/entity/Q19870> <urn:dboabstract> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "undefined" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q19870> <http://www.wikidata.org/prop/direct/P625> ?var4 . } OPTIONAL { ?var6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Article> ; <http://schema.org/about> <http://www.wikidata.org/entity/Q19870> ; <http://schema.org/inLanguage> "undefined"; <http://schema.org/isPartOf> <https://undefined.wikipedia.org/> . } } ORDER BY ASC( ?var8 )


Question: What is the most specific category that both Germany and Maiduguri belong 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 ?ancestor ?label WHERE {
  wd:Q3624078 wdt:P279 * ?ancestor .
  wd:Q515 wdt:P279 * ?ancestor .
  ?ancestor rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}
ORDER BY ASC ( STRLEN( STR( ?ancestor ) ) )
LIMIT 1

What is the common superclass of the type of Germany and the type of Maiduguri?

Which class is the closest ancestor shared by the category of Germany and the category of Maiduguri?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q221436> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q183> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What are the German-language labels for Germany?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?label WHERE {
  wd:Q183 rdfs:label ?label .
  FILTER ( LANGMATCHES( LANG( ?label ) , "de" ) )
}

Show me how Germany is called in German, including regional variants

What are the different German versions of Germany's name in Wikidata?

SELECT DISTINCT ?var1Label WHERE { <http://www.wikidata.org/entity/Q183> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( LANGMATCHES ( LANG ( ?var1Label ) , "de" ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de". } }


Question: What is the first commune (alphabetically) in the Alpes-Maritimes department, which includes Nice?

SELECT ?commune ?communeLabel WHERE { ?commune wdt:P31 wd:Q484170 ; wdt:P131 wd:Q3139 . ?commune rdfs:label ?communeLabel . FILTER(LANG(?communeLabel) = "en") } ORDER BY ?communeLabel LIMIT 1

List the smallest administrative subdivision of Nice, France, in alphabetical order.

Which commune in the French region of Provence-Alpes-Côte d'Azur, located in Alpes-Maritimes, comes first when sorted by name?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q7122733> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q33959> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the smallest administrative region that contains both the city of Kunduz and Kunduz Province?

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 ?common ?label WHERE {
  wd:Q108155 wdt:P131 * ?common .
  wd:Q186418 wdt:P131 * ?common .
  ?common rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}
ORDER BY ASC(?common)
LIMIT 1

Which administrative entity is a common ancestor of Kunduz city and Kunduz Province in the geographic hierarchy?

Find the least specific location that both Kunduz and Kunduz Province are part of.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q7122733> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q108155> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Boris Johnson and the West Bank belong to?

SELECT ?commonClass ?commonClassLabel
WHERE {
  wd:Q180589 wdt:P31 ?class1 .
  wd:Q36678 wdt:P31 ?class2 .
  ?class1 wdt:P279* ?commonClass .
  ?class2 wdt:P279* ?commonClass .
  ?commonClass rdfs:label ?commonClassLabel .
  FILTER(LANG(?commonClassLabel) = "en")
}
ORDER BY ASC(STRLEN(STR(?commonClass)))
LIMIT 1

What is the common superclass in the Wikidata ontology shared by Boris Johnson and the West Bank?

Find the highest-level class that includes both Boris Johnson and the West Bank through their subclass relationships.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q36678> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q180589> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Least common subclass of human and sovereign state

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?lca WHERE {
  wd:Q5 wdt:P279 * ?lca .
  wd:Q3624078 wdt:P279 * ?lca .
  FILTER NOT EXISTS {
    wd:Q5 wdt:P279 * ?other .
    wd:Q3624078 wdt:P279 * ?other .
    ?other wdt:P279 * ?lca .
    FILTER(?other != ?lca)
  }
}
LIMIT 1

What is the most specific category that both humans and sovereign states belong to?

Find the top-level legal category shared by people and countries.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q422303> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q408> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific common superclass of news agencies and public broadcasters?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonSuperclass(COUNT(?mid1) + COUNT(?mid2) AS ?totalDist) WHERE {
  wd:Q192283 wdt:P279 + ?mid1 .
  ?mid1 wdt:P279 * ?commonSuperclass .
  wd:Q1126006 wdt:P279 + ?mid2 .
  ?mid2 wdt:P279 * ?commonSuperclass .
}
GROUP BY ?commonSuperclass
ORDER BY ASC(?totalDist)
LIMIT 1

What organization category do both the Korean Central News Agency and NPR belong to through their taxonomic hierarchy?

What is the closest shared category in the Wikidata taxonomy between KCNA and NPR?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q671510> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q326804> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Entities located in Canada

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:P131 wd:Q16 .
  ?item rdfs:label ?itemLabel .
  FILTER(LANG(?itemLabel) = "en")
}
LIMIT 60

What are some places, organizations, or entities located in Canada?

List up to 60 items that are administratively located within Canada, along with their English names.

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


Question: What is the English description of the Wikidata item with YSO ID 112449?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
SELECT ?item ?label ?description WHERE {
  ?item wdt:P2347 "112449" .
  OPTIONAL {
    ?item rdfs:label ?label .
    FILTER(LANG(?label) = "en")
  }
  OPTIONAL {
    ?item schema:description ?description .
    FILTER(LANG(?description) = "en")
  }
}

What is the name and description in English for the entity identified by YSO ID 112449?

Please provide the English label and description for the item that has the YSO ID 112449.

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


Question: What is the Ministry of Interior in Afghanistan?

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 ?ministry WHERE {
  ?ministry wdt:P17 ?government .
  ?government wdt:P17 wd:Q889 .
  ?ministry wdt:P31 wd:Q192350 .
  ?ministry rdfs:label ?label .
  FILTER(LANG(?label) = "en")
  .
  FILTER(CONTAINS(LCASE(?label) , "interior"))
}
LIMIT 1

Which government ministry in Afghanistan is responsible for interior affairs?

Can you identify the Afghan government department that handles internal affairs?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q6589202> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q889> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Organizations in Switzerland with ISNI identifiers

SELECT ?organizationLabel ?isni WHERE { ?organization (wdt:P31/wdt:P279*) wd:Q43229 . ?organization wdt:P17 wd:Q39 . ?organization rdfs:label ?organizationLabel . FILTER(LANG(?organizationLabel) = "en") OPTIONAL { ?organization wdt:P213 ?isni . } }

What are the names and ISNI codes of organizations located in Switzerland?

List the English names and ISNI numbers of all organizations in Switzerland, including those without an ISNI.

SELECT ?var1Label ?var2 ?var3 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q43229> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q39> . 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/P213> ?var3 . } }


Question: What is the most specific shared category between the University of California, Berkeley and Donald Trump?

SELECT ?type1 ?type1Label ?type2 ?type2Label WHERE { wd:Q168756 wdt:P31 ?type1 . wd:Q22686 wdt:P31 ?type2 . OPTIONAL { ?type1 rdfs:label ?type1Label . FILTER (lang(?type1Label) = "en") } OPTIONAL { ?type2 rdfs:label ?type2Label . FILTER (lang(?type2Label) = "en") } }

Are there any common subclasses that link UC Berkeley and Donald Trump in Wikidata?

Which entities are connected to both UC Berkeley and Donald Trump through their types?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q168756> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q22686> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both humans and positions belong to in Wikidata?

SELECT ?ancestor WHERE { wd:Q5 wdt:P279* ?ancestor . wd:Q4164871 wdt:P279* ?ancestor . } ORDER BY ?ancestor LIMIT 1

What is the highest-level class that includes both people and political offices?

What is the common ontological category shared by a human like François Hollande and the position of President of France?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q157> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q7122733> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Labels for Habsburg Netherlands in English, German, French, and Italian, along with its French Wikipedia link.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
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/>
PREFIX schema: <http://schema.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?label ?image ?coordinates ?wikipediaArticle WHERE {
  OPTIONAL {
    wd:Q1031430 rdfs:label ?label .
    FILTER ( LANG( ?label ) IN ( "en" , "de" , "fr" , "it" ) ) VALUES ( ?lang ?sort ) {
      ( "en" "1" ^^ xsd:integer ) ( "de" "2" ^^ xsd:integer ) ( "fr" "3" ^^ xsd:integer ) ( "it" "4" ^^ xsd:integer )
    }
    FILTER ( LANG( ?label ) = ?lang )
  }
  OPTIONAL {
    wd:Q1031430 wdt:P18 ?image .
  }
  OPTIONAL {
    wd:Q1031430 wdt:P625 ?coordinates .
  }
  OPTIONAL {
    ?wikipediaArticle rdf:type schema:Article ; schema:about wd:Q1031430 ; schema:inLanguage "fr" ; schema:isPartOf <https://fr.wikipedia.org/> .
  }
}
ORDER BY ASC ( ?sort )

What are the labels for Habsburg Netherlands in different languages, and what is its French Wikipedia article?

Show me the English, German, French, and Italian labels for Habsburg Netherlands, and provide the link to its French Wikipedia page.

SELECT ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { OPTIONAL { <http://www.wikidata.org/entity/Q1031430> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = ?var7 ) ) ) . VALUES ( ?var7 ?var8 ) { ( "fr""1"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "en""2"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "de""3"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "fr""4"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "it""5"^^<http://www.w3.org/2001/XMLSchema#integer> ) } } OPTIONAL { <http://www.wikidata.org/entity/Q1031430> <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { <http://www.wikidata.org/entity/Q1031430> <urn:dboabstract> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "fr" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q1031430> <http://www.wikidata.org/prop/direct/P625> ?var4 . } OPTIONAL { ?var6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Article> ; <http://schema.org/about> <http://www.wikidata.org/entity/Q1031430> ; <http://schema.org/inLanguage> "fr"; <http://schema.org/isPartOf> <https://fr.wikipedia.org/> . } } ORDER BY ASC( ?var8 )


Question: Label in French/English/German/Italian, French description, image, coordinates, and French Wikipedia page for Darío de Regoyos.

SELECT ?var1Label ?var2 ?var3 ?var4 ?var6 WHERE { OPTIONAL { wd:Q23012147 rdfs:label ?var1Label . FILTER (LANG(?var1Label) = ?var7) . VALUES (?var7 ?var8) { ("fr" "1"^^xsd:integer) ("en" "2"^^xsd:integer) ("de" "3"^^xsd:integer) ("it" "4"^^xsd:integer) } } OPTIONAL { wd:Q23012147 wdt:P1813 ?var2 . FILTER (LANG(?var2) = "fr") . } OPTIONAL { wd:Q23012147 wdt:P18 ?var3 . } OPTIONAL { wd:Q23012147 wdt:P625 ?var4 . } OPTIONAL { ?var6 rdf:type schema:Article ; schema:about wd:Q23012147 ; schema:inLanguage "fr" ; schema:isPartOf <https://fr.wikipedia.org/> . } } ORDER BY ASC(?var8)

What is the French, English, German, or Italian label of Darío de Regoyos, along with his French short description, image, coordinates, and French Wikipedia link?

Please provide the preferred language label (French first), French short description, image, geographic coordinates, and French Wikipedia article for the Spanish painter Darío de Regoyos.

SELECT ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { OPTIONAL { <http://www.wikidata.org/entity/Q23012147> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = ?var7 ) ) ) . VALUES ( ?var7 ?var8 ) { ( "fr""1"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "en""2"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "de""3"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "fr""4"^^<http://www.w3.org/2001/XMLSchema#integer> ) ( "it""5"^^<http://www.w3.org/2001/XMLSchema#integer> ) } } OPTIONAL { <http://www.wikidata.org/entity/Q23012147> <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { <http://www.wikidata.org/entity/Q23012147> <urn:dboabstract> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "fr" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q23012147> <http://www.wikidata.org/prop/direct/P625> ?var4 . } OPTIONAL { ?var6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Article> ; <http://schema.org/about> <http://www.wikidata.org/entity/Q23012147> ; <http://schema.org/inLanguage> "fr"; <http://schema.org/isPartOf> <https://fr.wikipedia.org/> . } } ORDER BY ASC( ?var8 )


Question: What are all the pairs of main topics covered by the book "The Anarchy: War and Status in 12th-Century Landscapes of Conflict"?

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 ?var1 ?var1Label ?var2 ?var2Label WHERE {
  wd:Q42376499 wdt:P921 ?var1 .
  wd:Q42376499 wdt:P921 ?var2 .
  FILTER ( ?var1 != ?var2 ) ?var1 rdfs:label ?var1Label .
  ?var2 rdfs:label ?var2Label .
  FILTER ( lang( ?var1Label ) = "en" && lang( ?var2Label ) = "en" )
}

List all combinations of two different subjects that the book "The Anarchy: War and Status in 12th-Century Landscapes of Conflict" is about.

Which pairs of topics are associated with the book "The Anarchy: War and Status in 12th-Century Landscapes of Conflict"?

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


Question: Taxa with 'Daggi' in their scientific name

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?taxon ?name ?taxonLabel WHERE {
  ?taxon wdt:P225 ?name .
  FILTER ( CONTAINS( LCASE( ?name ) , "daggi" ) ) .
  ?taxon rdfs:label ?taxonLabel .
  FILTER ( LANG( ?taxonLabel ) = "en" )
}

Which species has 'Daggi' in its scientific name?

Show me the English label and scientific name of any taxon containing 'Daggi' in its name.

ASK WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1421> "Daggi". }


Question: Taxa named Seppo

SELECT ?taxon ?label WHERE { ?taxon rdfs:label "Seppo"@en . ?taxon wdt:P105 ?rank . }

Is there a species named Seppo in Wikidata?

Show me any biological taxa with the name 'Seppo'.

ASK WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1421> "Seppo". }


Question: Who is the French-labeled person named "Sèrgi Carles"?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?var1 WHERE {
  ?var1 rdfs:label "Sèrgi Carles" @fr .
  ?var1 wdt:P31 wd:Q5 .
}

Find the human being known as "Sèrgi Carles" in French.

What entity in Wikidata has the French label "Sèrgi Carles" and is a human?

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


Question: What is the most specific category that both Israel and The Washington Post belong to in Wikidata’s classification system?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonSuperclass WHERE {
  wd:Q801 wdt:P31 ?type1 .
  wd:Q166032 wdt:P31 ?type2 .
  ?type1 wdt:P279 * ?commonSuperclass .
  ?type2 wdt:P279 * ?commonSuperclass .
  FILTER ( ?type1 != ?type2 ) FILTER ( ?commonSuperclass != ?type1 && ?commonSuperclass != ?type2 )
}
ORDER BY ASC ( STRLEN( STR( ?commonSuperclass ) ) )
LIMIT 1

Is there any shared type or category that connects the country Israel and the newspaper The Washington Post through their classifications?

What is the highest-level common class that includes both Israel and The Washington Post in Wikidata?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q801> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q166032> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Beijing and Korea belong to?

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 ?label WHERE {
  wd:Q956 wdt:P31 ?type1 .
  wd:Q18097 wdt:P31 ?type2 .
  ?type1 wdt:P279 * wd:Q618123 .
  ?type2 wdt:P279 * wd:Q618123 .
  wd:Q618123 rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}

What do Beijing and Korea have in common in terms of their classification in Wikidata?

Which higher-level class encompasses both the city of Beijing and the nation of Korea?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q956> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q18097> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Entities in Budapest with images, Commons categories, and addresses

SELECT ?item ?itemLabel ?location ?image ?commonsCategory ?address WHERE { ?item wdt:P625 ?location . ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") OPTIONAL { ?item wdt:P18 ?image . } OPTIONAL { ?item wdt:P373 ?commonsCategory . } OPTIONAL { ?item wdt:P969 ?address . } FILTER(STRSTARTS(STR(?location), "POINT(19.")) } LIMIT 3000

What are the English-labeled locations near longitude 19°E in Hungary that have images or Wikimedia Commons categories?

Show me the names, locations, images, and Commons categories of places in Budapest with English labels.

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(19 48)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#cornerNorthEast> "POINT(19 48)"^^<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 is a road located in Nigeria?

SELECT ?road ?roadLabel WHERE { ?road wdt:P31 wd:Q34442 . ?road wdt:P131 wd:Q1033 . ?road rdfs:label ?roadLabel . FILTER(LANG(?roadLabel) = "en") } LIMIT 1

Can you name a road in Nigeria?
Which road is found in Nigeria?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q1033> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q886257> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What country do Ohio and The Washington Post both belong 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 ?common_value ?label WHERE {
  wd:Q1397 ?p ?common_value .
  wd:Q166032 ?p ?common_value .
  FILTER(?p = wdt:P17)
  ?common_value rdfs:label ?label .
  FILTER(LANG(?label) = 'en')
}

Which entity is shared as the country of both Ohio and The Washington Post?

Find the common country associated with Ohio and The Washington Post.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q1397> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q166032> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What are the shared categories (types) that both Texas and Croydon University Hospital belong to through their classifications?

SELECT ?commonClass WHERE { wd:Q1439 wdt:P31 ?type1 . wd:Q5189706 wdt:P31 ?type2 . ?type1 wdt:P279* ?commonClass . ?type2 wdt:P279* ?commonClass . FILTER(?commonClass != wd:Q35120) } ORDER BY ASC(STRLEN(STR(?commonClass))) LIMIT 10

What is the most specific class that is a superclass of both the type of Texas and the type of Croydon University Hospital?

What do Texas and Croydon University Hospital have in common in terms of their Wikidata classifications?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q1439> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q5189706> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Tunis and Ramallah belong to through their class hierarchies?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonClass WHERE {
  wd:Q3572 wdt:P31 ?class1 .
  wd:Q158119 wdt:P31 ?class2 .
  ?class1 wdt:P279 + ?commonClass .
  ?class2 wdt:P279 * ?commonClass .
}
ORDER BY ASC ( ?commonClass )
LIMIT 1

Which superclass is shared by the class of Tunis and the class of Ramallah, with the shortest combined distance in the subclass tree?

Find the common parent class in the Wikidata hierarchy for the categories that Tunis and Ramallah are instances of.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q3572> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q158119> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Florida and Argentina belong to through their types?

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 ?commonSuperclass ?label WHERE {
  wd:Q812 wdt:P31 ?type1 .
  ?type1 wdt:P279 * wd:Q7275 .
  wd:Q414 wdt:P31 ?type2 .
  ?type2 wdt:P279 * wd:Q7275 .
  wd:Q7275 rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}

What is the common superclass of the types of Florida and Argentina?

What do Florida and Argentina have in common in terms of their classification in Wikidata?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q812> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q414> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Lowest common subclass of San José, Costa Rica and Croydon University Hospital

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?ancestor1(?dist1 + ?dist2 AS ?totalDistance) WHERE {
  {
    SELECT ?ancestor1(COUNT(?mid1) AS ?dist1) WHERE {
      wd:Q3070 wdt:P31 ?type1 .
      ?type1 wdt:P279 + ?mid1 .
      ?mid1 wdt:P279 * ?ancestor1 .
    }
    GROUP BY ?ancestor1
  }
  {
    SELECT ?ancestor2(COUNT(?mid2) AS ?dist2) WHERE {
      wd:Q5189706 wdt:P31 ?type2 .
      ?type2 wdt:P279 + ?mid2 .
      ?mid2 wdt:P279 * ?ancestor2 .
    }
    GROUP BY ?ancestor2
  }
  FILTER(?ancestor1 = ?ancestor2)
}
ORDER BY ASC(?totalDistance)
LIMIT 1

What is the most specific category that both San José, Costa Rica and Croydon University Hospital belong to through their types?

Find the closest shared ancestor in the subclass hierarchy between the types of San José, Costa Rica and Croydon University Hospital.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q3070> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q5189706> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Most specific common superclass of Chibok and Croydon University Hospital in Wikidata's type hierarchy.

SELECT ?commonClass ?label (?dist1 + ?dist2 AS ?totalDistance)
WHERE {
  {
    SELECT ?commonClass (COUNT(?mid1) AS ?dist1)
    WHERE {
      wd:Q5095348 wdt:P31 ?type1 .
      ?type1 wdt:P279+ ?mid1 .
      ?mid1 wdt:P279* ?commonClass .
    }
    GROUP BY ?commonClass
  }

  {
    SELECT ?commonClass (COUNT(?mid2) AS ?dist2)
    WHERE {
      wd:Q5189706 wdt:P31 ?type2 .
      ?type2 wdt:P279+ ?mid2 .
      ?mid2 wdt:P279* ?commonClass .
    }
    GROUP BY ?commonClass
  }

  ?commonClass rdfs:label ?label .
  FILTER(LANG(?label) = "en")

  FILTER(?dist1 + ?dist2 > 0)
}
ORDER BY ASC(?totalDistance)
LIMIT 1

What is the most specific shared category (class) that both Chibok and Croydon University Hospital belong to, based on their type hierarchies?

Find the common ancestor class in the subclass hierarchy with the smallest total distance from both Chibok and Croydon University Hospital, and return its English label.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q5095348> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q5189706> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Zimbabwe and Argentina belong to?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonType(COUNT(?subclass) AS ?subClassCount) WHERE {
  wd:Q954 wdt:P31 ?commonType .
  wd:Q414 wdt:P31 ?commonType .
  ?subclass wdt:P279 ?commonType .
}
GROUP BY ?commonType
ORDER BY ASC(?subClassCount)
LIMIT 1

What type do Zimbabwe and Argentina have in common that is the most specific?

What is the highest-level classification shared by Zimbabwe and Argentina in Wikidata?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q954> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q414> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that both Europe and Costa Rica belong to?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonSuperclass WHERE {
  wd:Q46 wdt:P31 ?type1 .
  ?type1 wdt:P279 * ?commonSuperclass .
  FILTER EXISTS {
    wd:Q800 wdt:P31 ?type2 .
    ?type2 wdt:P279 * ?commonSuperclass .
  }
}
ORDER BY ASC(STRLEN(STR(?commonSuperclass)))
LIMIT 1

Which class is a common ancestor in the type hierarchy of the continent Europe and the country Costa Rica?

Find the highest-level shared classification between Europe and Costa Rica based on their types.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q46> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q800> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What countries are Berlin and Juan Santamaría International Airport located in?

SELECT ?country1 ?country2 WHERE { wd:Q64 wdt:P17 ?country1 . wd:Q555940 wdt:P17 ?country2 . }

Can you tell me the nation that Berlin belongs to and the nation where Juan Santamaría International Airport is situated?

Which two countries are associated with the city of Berlin and the Juan Santamaría International Airport?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q555940> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q64> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific common ancestor in the Wikidata ontology between the United States Department of State and Russia?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?ancestor WHERE {
  wd:Q789915 wdt:P31 ?type1 .
  ?type1 wdt:P279 * ?ancestor .
  FILTER EXISTS {
    wd:Q159 wdt:P31 ?type2 .
    ?type2 wdt:P279 * ?ancestor .
  }
}
ORDER BY ?ancestor
LIMIT 1

Which class is the closest shared parent in the subclass hierarchy for both the U.S. Department of State and Russia?

Find the most specific category that both the U.S. Department of State and Russia belong to through their types.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q789915> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q159> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific category that connects Stanley Crouch's occupations with the concept of a business oligarch?

SELECT ?commonClass ?label WHERE { wd:Q355531 wdt:P106 ?occ . ?occ wdt:P279* ?commonClass . wd:Q2006045 wdt:P279* ?commonClass . ?commonClass rdfs:label ?label . FILTER (LANG(?label) = "en") } ORDER BY ?commonClass LIMIT 1

What do Stanley Crouch's jobs and business oligarchs have in common in terms of Wikidata classification?

What is the highest-level class that includes both Stanley Crouch's professions and the occupation of business oligarch?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q355531> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q2006045> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What are some paintings created by Leonardo da Vinci?

SELECT ?painting ?paintingLabel WHERE { ?painting wdt:P170 wd:Q762 ; wdt:P31 wd:Q3305213 . ?painting rdfs:label ?paintingLabel . FILTER(LANG(?paintingLabel) = "en") }

List the English-labeled paintings by Leonardo da Vinci.

Which artworks are attributed to Leonardo da Vinci in Wikidata?

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3305213> ; <http://www.wikidata.org/prop/direct/P127> <http://www.wikidata.org/entity/Q142> ; <http://www.w3.org/2002/07/owl#sameAs> ?var2 ; <http://www.wikidata.org/prop/direct/P170> <http://www.wikidata.org/entity/Q762> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } }


Question: What is the most specific category that both a human and the Bastille belong to?

SELECT ?ancestor (SUM(?dist1 + ?dist2) AS ?totalDist) WHERE { { SELECT ?ancestor (COUNT(?step) AS ?dist1) WHERE { wd:Q5 wdt:P279+ ?step . ?step wdt:P279* ?ancestor . FILTER(?ancestor != wd:Q5) } GROUP BY ?ancestor } { SELECT ?ancestor (COUNT(?step) AS ?dist2) WHERE { VALUES ?bastille { wd:Q40357 wd:Q23413 wd:Q19860854 } ?bastille wdt:P279+ ?step . ?step wdt:P279* ?ancestor . FILTER(?ancestor != ?bastille) } GROUP BY ?ancestor } } GROUP BY ?ancestor ORDER BY ?totalDist LIMIT 1

What is the shared superclass with the smallest total distance in the taxonomy between Stanley Crouch and the Bastille?

Find the common ancestor in the subclass hierarchy between a person and a former fortress, ranked by minimal path length sum.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q355531> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q1865480> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What is the most specific shared category that both Japan and the settlement of Banki belong to?

SELECT ?ancestor ?label WHERE { wd:Q17 wdt:P31 ?class1 . ?class1 wdt:P279* ?ancestor . wd:Q2563333 wdt:P31 ?class2 . ?class2 wdt:P279* ?ancestor . ?ancestor rdfs:label ?label . FILTER (LANG(?label) = "en") FILTER (?ancestor = wd:Q27096213) } LIMIT 1

What is the highest-level concept that classifies both Japan and Banki through their types and subclasses?

Through the hierarchy of types, what is the common ancestor class of Japan and Banki?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q2563333> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q17> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Which entities on Wikidata have Twitter usernames BBCNews, elonmusk, Wikipedia, or timberners_lee?

SELECT ?item ?username WHERE { ?item wdt:P2002 ?username . FILTER(?username IN ("BBCNews", "elonmusk", "Wikipedia", "timberners_lee")) } ORDER BY ?username

Who are the people or organizations on Wikidata with the Twitter handles @BBCNews, @elonmusk, @Wikipedia, and @timberners_lee?

List the Wikidata items that are linked to the Twitter accounts BBCNews, elonmusk, Wikipedia, and timberners_lee.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "Guardian" ) ( "chrisdc77" ) ( "Casmilus" ) } } ORDER BY ASC( ?var3 )