Question: What is the most specific class that both Iris Chang and Paul Simon are instances of?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonSuperclass WHERE {
  wd:Q234338 wdt:P31 ?c1 .
  wd:Q4028 wdt:P31 ?c2 .
  ?c1 wdt:P279 * ?commonSuperclass .
  ?c2 wdt:P279 * ?commonSuperclass .
  FILTER ( ?commonSuperclass = wd:Q5 )
}

What is the lowest common ancestor in the Wikidata taxonomy for Iris Chang and Paul Simon?

What category do Iris Chang and Paul Simon both belong to at the most specific level?

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/Q234338> ; <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/Q4028> ; <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 Portuguese names for the genres that comedy film belongs to?

SELECT ?subclass ?label WHERE { wd:Q157443 wdt:P279 ?subclass . ?subclass rdfs:label ?label . FILTER (LANG(?label) = "pt") }

In Portuguese, what are the broader categories that comedy film is a subclass of?

How do you say the parent genres of comedy film in Portuguese?

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/Q157443> <http://www.wikidata.org/prop/direct/P279> ?var1 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "pt" ) ) ) . } LIMIT 50


Question: What events have participants, and who are they?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?event ?eventLabel ?participant ?participantLabel WHERE {
  ?event wdt:P31 / wdt:P279 * wd:Q1656682 ; wdt:P710 ?participant .
  ?event rdfs:label ?eventLabel .
  ?participant rdfs:label ?participantLabel .
  FILTER(LANG(?eventLabel) = 'en')
  .
  FILTER(LANG(?participantLabel) = 'en')
  .
}
LIMIT 10

Can you list events and their participants in English?

Which people participated in which events, based on Wikidata?

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


Question: Which Wikidata items have Twitter/X usernames including elonmusk, SpaceX, EFF, AdobeXD, Wikimedia, cstross, ash_crow, samleecole, Mandinka_X, KelamWiki, or hatonjan?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?handle WHERE {
  ?item wdt:P2002 ?handle .
  VALUES ?handle {
    "elonmusk" "SpaceX" "EFF" "AdobeXD" "Wikimedia" "tds153" "cstross" "ash_crow" "Mandinka_X" "mspowahs" "KelamWiki" "hatonjan" "samleecole"
  }
}
ORDER BY ?handle

Who are the people or organizations on Wikidata with Twitter/X handles like "elonmusk", "SpaceX", or "EFF"?

List the Wikidata entities and their Twitter/X usernames for the handles: elonmusk, SpaceX, EFF, AdobeXD, Wikimedia, cstross, ash_crow, samleecole, Mandinka_X, KelamWiki, and hatonjan.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "sarahjeong" ) ( "algoritmic" ) ( "string1" ) ( "a_ka_es" ) ( "string2" ) ( "sunbains" ) ( "Rekrut_K" ) ( "FDJ_Sport" ) ( "FDJ" ) ( "PoulpyWP" ) ( "string3" ) ( "Volker_E" ) ( "string4" ) ( "nirzardp" ) ( "_stk" ) ( "Wikimedia" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "ash_crow" ) ( "string11" ) ( "Aelmaire" ) ( "string12" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "mspowahs" ) ( "Mandinka_X" ) ( "cstross" ) ( "elonmusk" ) ( "SpaceX" ) ( "tds153" ) ( "EFF" ) ( "AdobeXD" ) ( "string16" ) ( "edzitron" ) ( "string17" ) ( "Walldo" ) ( "K_rho" ) ( "string18" ) ( "string19" ) ( "meakoopa" ) ( "string20" ) ( "string21" ) ( "string22" ) ( "string23" ) ( "KelamWiki" ) ( "hatonjan" ) ( "samleecole" ) } } ORDER BY ASC( ?var3 )


Question: Image of Gaspar Flores de Abrego (SNAC ARK ID w6126g0w)

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

Is there an image available for Gaspar Flores de Abrego, identified by the SNAC ARK ID w6126g0w?

Please return the Wikimedia Commons image associated with the person having SNAC ARK ID w6126g0w.

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


Question: What is the most specific category that both Bruce Arians' and Neil Portnow's occupations belong to?

SELECT ?common WHERE {
  wd:Q4046340 wdt:P106 ?occ1 .
  wd:Q6989165 wdt:P106 ?occ2 .
  ?occ1 wdt:P279* ?common .
  ?occ2 wdt:P279* ?common .
  FILTER NOT EXISTS {
    ?other wdt:P279* ?common .
    wd:Q4046340 wdt:P106 ?o1 .
    ?o1 wdt:P279* ?other .
    wd:Q6989165 wdt:P106 ?o2 .
    ?o2 wdt:P279* ?other .
    FILTER(?other != ?common)
  }
}
LIMIT 1

What is the common superclass in Wikidata's taxonomy that connects the occupations of Bruce Arians and Neil Portnow?

Find the lowest-level class in the subclass hierarchy that includes all occupations of Bruce Arians and Neil Portnow.

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/Q4046340> ; <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/Q6989165> ; <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 class of Reuters and Iceland in the Wikidata taxonomy?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?ancestor ( MIN( ?dist1 ) + MIN( ?dist2 ) AS ?totalDist ) WHERE {
  {
    SELECT ?ancestor ( COUNT( * ) AS ?dist1 ) WHERE {
      wd:Q130879 wdt:P31 ?c1 .
      ?c1 wdt:P279 + ?ancestor .
    }
    GROUP BY ?ancestor
  }
  {
    SELECT ?ancestor ( COUNT( * ) AS ?dist2 ) WHERE {
      wd:Q189 wdt:P31 ?c2 .
      ?c2 wdt:P279 + ?ancestor .
    }
    GROUP BY ?ancestor
  }
}
GROUP BY ?ancestor
ORDER BY ASC ( ?totalDist )
LIMIT 1

Which entity is the closest shared superclass of both Reuters and Iceland, based on their type hierarchies?

Find the common ancestor in the subclass hierarchy that minimizes the sum of distances from Reuters 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/Q130879> ; <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: Image of the person with SNAC ARK ID w6hc1x52

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

What is the image associated with Neil Patrick Harris in Wikidata?

Can you find the Wikimedia Commons image for the individual identified by the SNAC ARK ID w6hc1x52?

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


Question: Which Wikidata entities have the Twitter usernames 'jsamwrites', 'UNESCO', or '999Share'?

SELECT ?item ?username WHERE { ?item wdt:P2002 ?username . VALUES ?username { "jsamwrites" "UNESCO" "999Share" } }

Does UNESCO have an official X (Twitter) account, and what are the other entities with usernames 'jsamwrites' or '999Share'?

Show me the Wikidata items that use 'jsamwrites', 'UNESCO', or '999Share' as their X (Twitter) username.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "jsamwrites" ) ( "UNESCO" ) ( "999Share" ) } }


Question: What is the English Wikipedia page for the film with IMDb ID tt0300983?

SELECT ?item ?wikipediaPage ?imdbId ?itemLabel WHERE { ?item wdt:P345 "tt0300983" . ?wikipediaPage schema:about ?item . { ?wikipediaPage schema:inLanguage "en" . } UNION { ?wikipediaPage schema:inLanguage "de" . } BIND("tt0300983" AS ?imdbId) ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }

Show me the title and Wikipedia link of the movie identified by IMDb ID tt0300983, in English or German.

Find the English label and corresponding Wikipedia page for the film that has the IMDb identifier tt0300983.

SELECT ?var1 ?var2 ?var3 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt0300983". } ?var2 <http://schema.org/about> ?var1 . { ?var2 <http://schema.org/inLanguage> "en". } UNION { ?var2 <http://schema.org/inLanguage> "de". } ?var1 <http://www.wikidata.org/prop/direct/P345> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Which entities have Twitter usernames "BarackObama", "Google", or "librarycongress", and how many Wikipedia articles are linked to each?

SELECT ?entity ?twitterUsername (COUNT(?sitelink) AS ?sitelinks) WHERE { ?entity wdt:P2002 ?twitterUsername . ?sitelink schema:about ?entity . VALUES ?twitterUsername { "BarackObama" "Google" "librarycongress" } } GROUP BY ?entity ?twitterUsername ORDER BY ASC(?sitelinks)

What are the Wikipedia sitelink counts for the entities with Twitter accounts @BarackObama, @Google, and @librarycongress?

List the entities with Twitter usernames BarackObama, Google, or librarycongress, sorted by the number of Wikipedia pages linked to them, from least to most.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "Lilly0400" ) ( "string1" ) ( "string2" ) ( "string3" ) ( "wayne2274" ) ( "string4" ) ( "string5" ) ( "suprshok" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "fineanal" ) ( "ButtBust" ) ( "AssReFocus" ) ( "AssStar_0_" ) ( "string13" ) ( "WhoIsSBK2" ) ( "string14" ) ( "LP_FANATIC" ) ( "bankai_77" ) ( "string15" ) ( "string16" ) ( "string17" ) } } ORDER BY ASC( ?var3 )


Question: Which Wikidata entities have Twitter handles like FFF, Paris2024, or ffhandball, and how many Wikipedia sitelinks do they have?

SELECT ?item ?handle (COUNT(?site) AS ?sitelinks) WHERE { ?item wdt:P2002 ?handle . ?site schema:about ?item ; schema:isPartOf ?wiki . VALUES ?handle { "Paris2024" "ffhandball" "FFF" "FIFAWWC" "canalplus" "TonyYoka" "AFPSport" "FFNatation" "FF_Boxe" "STOMPNYC" "ChBeauvais" "jeromesapo" "gatienjp" } } GROUP BY ?item ?handle ORDER BY ASC(?sitelinks)

Can you list the organizations and people on Wikidata with Twitter usernames such as FFF, FIFAWWC, or canalplus, sorted by how popular they are based on the number of Wikipedia pages about them?

Show me the Wikidata items that use Twitter handles including FFF, Paris2024, and ffhandball, along with their sitelink counts, ordered from least to most popular.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "string3" ) ( "Paris2024" ) ( "gatienjp" ) ( "string4" ) ( "_Bercy_" ) ( "string5" ) ( "string6" ) ( "FFNatation" ) ( "AFPSport" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "string13" ) ( "jeromesapo" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "HovineYann" ) ( "string17" ) ( "ffhandball" ) ( "string18" ) ( "string19" ) ( "string20" ) ( "string21" ) ( "string22" ) ( "TonyYoka" ) ( "string23" ) ( "string24" ) ( "canalplus" ) ( "FF_Boxe" ) ( "string25" ) ( "string26" ) ( "string27" ) ( "Stimium" ) ( "string28" ) ( "string29" ) ( "FFF" ) ( "string30" ) ( "string31" ) ( "string32" ) ( "string33" ) ( "string34" ) ( "string35" ) ( "FIFAWWC" ) ( "string36" ) ( "string37" ) ( "STOMPNYC" ) ( "ChBeauvais" ) } } ORDER BY ASC( ?var3 )


Question: List battles with their location, start and end dates, and the war they were part of.

SELECT ?battle ?battleLabel ?locationLabel ?startTime ?endTime ?war ?warLabel WHERE { ?battle wdt:P31 wd:Q178561 . ?battle rdfs:label ?battleLabel . FILTER (LANG(?battleLabel) = "en") . OPTIONAL { ?battle wdt:P276 ?location . ?location rdfs:label ?locationLabel . FILTER (LANG(?locationLabel) = "en") . } { ?battle wdt:P585 ?startTime . } UNION { ?battle wdt:P580 ?startTime . } { ?battle wdt:P582 ?endTime . } UNION { ?battle wdt:P585 ?endTime . } OPTIONAL { ?battle wdt:P361 ?war . ?war rdfs:label ?warLabel . FILTER (LANG(?warLabel) = "en") . } }

What are the battles, their locations, when they occurred, and which wars they belonged to?

Show me a list of battles, including where they took place, when they started and ended, and which larger conflict they were part of.

SELECT ?var1 ?var1Label ?var2 ?var3Label ?var4Label ?var5 ?var6 ?var7 ?var8 ?var9 ?var9Label WHERE { ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q178561> . ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P361> ?var9 . ?var9 <http://www.w3.org/2000/01/rdf-schema#label> ?var9Label . FILTER ( ( ( LANG ( ?var9Label ) = "en" ) ) ) . } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . ?var2 <http://www.wikidata.org/prop/direct/P31> ?var1 . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P625> ?var6 . } OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P276> ?var4 . ?var4 <http://www.wikidata.org/prop/direct/P625> ?var5 . ?var4 <http://www.w3.org/2000/01/rdf-schema#label> ?var4Label . FILTER ( ( ( LANG ( ?var4Label ) = "en" ) ) ) . } { ?var2 <http://www.wikidata.org/prop/direct/P585> ?var7 . } UNION { ?var2 <http://www.wikidata.org/prop/direct/P580> ?var7 . } { ?var2 <http://www.wikidata.org/prop/direct/P582> ?var8 . } UNION { ?var2 <http://www.wikidata.org/prop/direct/P585> ?var8 . } }


Question: What is the most specific common superclass of the classes to which Seoul and Iceland belong?

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 ?ancestor ?label WHERE {
  wd:Q8684 wdt:P31 ?class1 .
  wd:Q189 wdt:P31 ?class2 .
  ?class1 wdt:P279 * ?ancestor .
  ?class2 wdt:P279 * ?ancestor .
  ?ancestor rdfs:label ?label .
  FILTER(LANG(?label) = 'en')
}
ORDER BY ASC(?ancestor)
LIMIT 1

Find the most specific shared ancestor in the subclass hierarchy between the class of Seoul and the class of Iceland.

What is the lowest-level category that both Seoul and Iceland are instances of, in terms of their class hierarchy?

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/Q8684> ; <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 shared superclass between NATO and Thane Maynard in the Wikidata ontology?

SELECT ?commonAncestor WHERE { wd:Q5 wdt:P279* ?commonAncestor . wd:Q7184 wdt:P31 ?natoType . ?natoType wdt:P279* ?commonAncestor . ?commonAncestor rdfs:label ?label . FILTER(LANG(?label) = 'en') } ORDER BY STRLEN(STR(?label)) LIMIT 1

Which class is the closest common ancestor of NATO and the human Thane Maynard via the subclass hierarchy?

Find the shortest-labeled common superclass that connects NATO and Thane Maynard through their types 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/Q7184> ; <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/Q7710240> ; <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 was created, published, discovered, or officially opened on July 31, 1992?

SELECT DISTINCT ?item WHERE { ?item (wdt:P571 | wdt:P575 | wdt:P577 | wdt:P1619) ?date . FILTER ( ?date >= "1992-07-31T00:00:00Z"^^xsd:dateTime && ?date <= "1992-07-31T23:59:59Z"^^xsd:dateTime ) }

Which items had their inception, publication, discovery, or official opening on July 31, 1992?

List all entities that came into existence, were released, or were inaugurated on July 31, 1992.

SELECT DISTINCT ?var1 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P571> | <http://www.wikidata.org/prop/direct/P575> | <http://www.wikidata.org/prop/direct/P577> | <http://www.wikidata.org/prop/direct/P1619> ) ?var2 . FILTER ( ( ( ?var2 >= "1992-07-31T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1992-07-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: What is the most specific category that both South Korea and Donald Trump belong to through their class hierarchies?

SELECT ?commonSuperclass WHERE { { wd:Q884 wdt:P31 ?class1 . ?class1 wdt:P279* ?commonSuperclass . FILTER(?commonSuperclass != ?class1) } UNION { wd:Q22686 wdt:P31 ?class2 . ?class2 wdt:P279* ?commonSuperclass . FILTER(?commonSuperclass != ?class2) } } GROUP BY ?commonSuperclass HAVING (COUNT(*) = 2) ORDER BY ?commonSuperclass LIMIT 1

Which abstract concepts are common superclasses of both South Korea and Donald Trump in Wikidata’s ontology?

Find the top-level category shared by South Korea and Donald Trump based on their class 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/Q884> ; <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: List 100 films from Wikidata.

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

What are some examples of films in Wikidata?

Can you show me a list of 100 films stored in Wikidata?

SELECT DISTINCT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3914> . } LIMIT 100


Question: What is the most specific shared category that connects the NAACP and Aroldis Chapman in Wikidata's ontology?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?lca ?lcaLabel WHERE {
  wd:Q502044 wdt:P31 ?type1 .
  wd:Q1133513 wdt:P31 ?type2 .
  ?type1 wdt:P279 * ?lca .
  ?type2 wdt:P279 * ?lca .
  ?lca rdfs:label ?lcaLabel .
  FILTER(LANG(?lcaLabel) = "en")
  FILTER(?lca != wd:Q35120)
}
ORDER BY DESC(?lca)
LIMIT 1

What is the highest-level concept that both the NAACP (as an organization) and Aroldis Chapman (as a human) belong to?

What philosophical category encompasses both nonprofit organizations and humans in Wikidata's classification system?

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/Q502044> ; <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/Q1133513> ; <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 all the films listed in Wikidata?

SELECT ?film WHERE { ?film wdt:P31 wd:Q11424 . }

List all entities that are classified as films.

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


Question: How many events occur at different frequencies (e.g., daily, yearly) based on their interval values in Wikidata?

SELECT ?var1 ( COUNT(*) AS ?count ) WHERE { ?item p:P2257 ?statement . ?statement ps:P2257 ?amount . FILTER( isNumeric(?amount) ) BIND( IF( ?amount < 1.0, "<1", STRLEN( STR( xsd:integer( ?amount ) ) ) ) AS ?var1 ) } GROUP BY ?var1 ORDER BY ASC( ?var1 ) LIMIT 100

What is the distribution of event intervals in Wikidata, grouped by the number of digits in their integer values (e.g., 1-digit = 1–9, 2-digit = 10–99)?

Show me how many events have intervals less than 1, and how many have intervals with 1, 2, 3, or 4 digits in their integer part.

SELECT ?var1 ( COUNT ( ?var2 ) AS ?var3 ) WHERE { BIND ( STRLEN ( STR ( ROUND ( ?var2 ) ) ) AS ?var4 ). BIND ( IF ( ( ?var2 < "1"^^<http://www.w3.org/2001/XMLSchema#integer> ), "<1", ?var4 ) AS ?var1 ). ?var5 <http://www.wikidata.org/prop/direct/P2257> ?var2 . } GROUP BY ?var1 ORDER BY ASC( ?var1 ) LIMIT 100


Question: What is the most recent population of each county in England, and in which year was it recorded?

PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
SELECT ?countyLabel ?year ?population WHERE {
  {
    SELECT ?county ( MAX( ?date ) AS ?maxDate ) WHERE {
      ?county ( wdt:P31 / wdt:P279 * ) wd:Q171809 .
      ?county p:P1082 ?statement .
      ?statement pq:P585 ?date .
    }
    GROUP BY ?county
  }
  ?county p:P1082 ?statement .
  ?statement ps:P1082 ?population ; pq:P585 ?maxDate .
  OPTIONAL {
    ?county rdfs:label ?countyLabel .
    FILTER ( LANG( ?countyLabel ) = "en" )
  }
  BIND( YEAR( ?maxDate ) AS ?year )
}
ORDER BY ?countyLabel

Show the latest population figures for English counties along with the year of the data.

For each county in England, what was the population in its most recent recorded year?

SELECT ?var1 ?var2 WHERE { BIND ( YEAR ( ?var3 ) AS ?var1 ). ?var4 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q171809> . ?var4 <http://www.wikidata.org/prop/P1082> ?var5 . ?var5 <http://www.wikidata.org/prop/statement/P1082> ?var2 ; <http://www.wikidata.org/prop/qualifier/P585> ?var3 . FILTER ( ( NOT EXISTS { ?var4 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q171809> . ?var4 <http://www.wikidata.org/prop/P1082> ?var6 . ?var6 <http://www.wikidata.org/prop/statement/P1082> ?var7 ; <http://www.wikidata.org/prop/qualifier/P585> ?var8 . FILTER ( ( ( ?var8 > ?var3 ) ) ) . } ) ) . } GROUP BY ?var1 ?var2


Question: What historical events, works, or equipment entered service or had their first performance in 1705?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?item WHERE {
  {
    ?item wdt:P585 ?date
  } UNION {
    ?item wdt:P729 ?date
  } UNION {
    ?item wdt:P1191 ?date
  }
  .
  FILTER(?date >= "1705-01-01T00:00:00Z" ^^ xsd:dateTime && ?date <= "1705-12-31T23:59:59Z" ^^ xsd:dateTime)
}

List all items from Wikidata that occurred or were first performed in the year 1705.

Which plays, battles, or scientific developments took place in 1705?

SELECT DISTINCT ?var1 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P585> | <http://www.wikidata.org/prop/direct/P606> | <http://www.wikidata.org/prop/direct/P619> | <http://www.wikidata.org/prop/direct/P620> | <http://www.wikidata.org/prop/direct/P621> | <http://www.wikidata.org/prop/direct/P622> | <http://www.wikidata.org/prop/direct/P729> | <http://www.wikidata.org/prop/direct/P1191> ) ?var2 . FILTER ( ( ( ?var2 >= "1705-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1705-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: Russian-labeled objects and properties associated with the film Quantum of Solace

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 ?property ?propertyLabel ?value ?valueLabel ?image WHERE {
  wd:Q181540 ?property ?value .
  OPTIONAL {
    ?property rdfs:label ?propertyLabel .
  }
  ?value rdfs:label ?valueLabel .
  OPTIONAL {
    ?value wdt:P18 ?image .
  }
  FILTER(LANG(?valueLabel) = "ru")
}
ORDER BY ASC(?property) ASC(?value)
LIMIT 1000

What are the Russian-language labels of the entities related to the film Quantum of Solace, and what properties connect them?

Show me all the Russian-labeled values connected to Quantum of Solace, along with their property names and any available images.

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


Question: Events with start and end dates in Wikidata

SELECT DISTINCT ?event ?eventLabel ?start ?end WHERE { ?event wdt:P31 wd:Q1656682 . ?event wdt:P580 ?start . ?event wdt:P582 ?end . OPTIONAL { ?event rdfs:label ?eventLabel . FILTER(LANG(?eventLabel) = "en") } }

Which events have both a start time and an end time recorded in Wikidata?

List events along with their start and end times from Wikidata.

SELECT DISTINCT ?var1 ?var1Label ( ( ?var2 - ?var3 ) AS ?var4 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P361> * <http://www.wikidata.org/entity/Q1190554> . ?var1 <http://www.wikidata.org/prop/direct/P580> ?var3 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: All subclasses of film in English.

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 ?filmSubclass ?label WHERE {
  ?filmSubclass wdt:P279 * wd:Q11424 .
  OPTIONAL {
    ?filmSubclass rdfs:label ?label .
    FILTER ( LANG( ?label ) = "en" )
  }
}

What are the different types of films, categorized by subgenre or category, in English?

List all film subgenres and their English labels from Wikidata.

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


Question: What is the most specific category that both Afghanistan and San José, Costa Rica belong to?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?label WHERE {
  wd:Q889 wdt:P31 ?type1 .
  wd:Q3070 wdt:P31 ?type2 .
  ?type1 wdt:P279 * wd:Q56061 .
  ?type2 wdt:P279 * wd:Q56061 .
  wd:Q56061 rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}

What common administrative category do Afghanistan and San José share?

What is the highest-level shared classification between Afghanistan and San José, Costa Rica?

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/Q889> ; <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/Q3070> ; <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 a human and a city belong to in Wikidata?

SELECT ?commonAncestor ?commonAncestorLabel WHERE { wd:Q5 wdt:P279* ?commonAncestor . wd:Q515 wdt:P279* ?commonAncestor . OPTIONAL { ?commonAncestor rdfs:label ?commonAncestorLabel . FILTER(LANG(?commonAncestorLabel) = "en") } } ORDER BY DESC(?commonAncestorLabel) LIMIT 1

What shared class encompasses both people and cities according to Wikidata's ontology?

Find the most specific common superclass of humans and cities in the Wikidata knowledge graph.

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/Q367634> ; <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/Q16555> ; <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: Events that occurred in 1793

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?event WHERE {
  ?event ( wdt:P585 | wdt:P729 | wdt:P1191 ) ?date .
  FILTER ( ?date >= "1793-01-01T00:00:00Z" ^^ xsd:dateTime && ?date <= "1793-12-31T23:59:59Z" ^^ xsd:dateTime )
}

What events took place in the year 1793?

List all historical events, military engagements, or cultural premieres that happened in 1793, based on their recorded date of occurrence, service entry, or first performance.

SELECT DISTINCT ?var1 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P585> | <http://www.wikidata.org/prop/direct/P606> | <http://www.wikidata.org/prop/direct/P619> | <http://www.wikidata.org/prop/direct/P620> | <http://www.wikidata.org/prop/direct/P621> | <http://www.wikidata.org/prop/direct/P622> | <http://www.wikidata.org/prop/direct/P729> | <http://www.wikidata.org/prop/direct/P1191> ) ?var2 . FILTER ( ( ( ?var2 >= "1793-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1793-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: What are the Twitter accounts of NASA's Hubble Telescope and Neil deGrasse Tyson, and how many Wikipedia pages link to each?

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?username ( COUNT( ?sitelink ) AS ?sitelinks ) WHERE {
  ?item wdt:P2002 ?username .
  ?sitelink schema:about ?item ; schema:isPartOf ?site .
  VALUES ?username {
    "NASAHubble" "neiltyson"
  }
}
GROUP BY ?item ?username
ORDER BY ASC ( ?sitelinks )

Which of the Twitter accounts @NASAHubble and @neiltyson has more Wikipedia articles about them, and how many are there?

List the entities with Twitter usernames "NASAHubble" or "neiltyson" sorted by how many language versions of Wikipedia have articles about them.

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


Question: What is the most specific category that both Mike Neu and Luke Harding belong to?

SELECT ?class WHERE { wd:Q6848177 wdt:P31 ?class . wd:Q6702023 wdt:P31 ?class . }

What class do Mike Neu and Luke Harding have in common as their direct type?

What is the shared superclass of the American baseball player Mike Neu and the British journalist Luke Harding?

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/Q6848177> ; <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/Q6702023> ; <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 have Twitter handles "BarackObama", "BBCNews", or "CNN", and how many Wikipedia language versions do they have?

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?handle ?sitelinkCount WHERE {
  VALUES ?handle {
    "BarackObama" "BBCNews" "CNN"
  }
  ?item wdt:P2002 ?handle .
  {
    SELECT ?item ( COUNT( ?sitelink ) AS ?sitelinkCount ) WHERE {
      ?sitelink schema:about ?item ; schema:isPartOf ?wiki .
    }
    GROUP BY ?item
  }
}
ORDER BY ASC ( ?sitelinkCount )

What are the Twitter accounts for Barack Obama, BBC News, and CNN, and which one has the fewest Wikipedia language editions?

List the entities corresponding to the Twitter handles "BarackObama", "BBCNews", and "CNN", sorted by the number of Wikipedia language versions they appear on.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "tmctv" ) ( "tsamere" ) ( "string3" ) ( "string4" ) ( "Juli1RonD" ) ( "ELLEfrance" ) ( "loftstory" ) ( "string5" ) ( "waxxgyver" ) ( "string6" ) ( "Herev89" ) ( "France5tv" ) ( "string7" ) ( "LinoTreize" ) ( "string8" ) ( "BFMTV" ) ( "string9" ) ( "libe" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "string13" ) ( "ornikkar" ) ( "string14" ) ( "string15" ) ( "GLouvin" ) ( "string16" ) ( "string17" ) } } ORDER BY ASC( ?var3 )


Question: What items were created, published, discovered, or officially opened on September 7, 2017?

SELECT DISTINCT ?item WHERE { ?item (wdt:P571 | wdt:P575 | wdt:P577 | wdt:P1619) ?date . FILTER ( ?date >= "2017-09-07T00:00:00Z"^^xsd:dateTime && ?date <= "2017-09-07T23:59:59Z"^^xsd:dateTime ) }

Which entities on Wikidata have a date of inception, publication, discovery, or official opening on September 7, 2017?

Show me all works, projects, or organizations that were launched, published, or discovered on September 7, 2017.

SELECT DISTINCT ?var1 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P571> | <http://www.wikidata.org/prop/direct/P575> | <http://www.wikidata.org/prop/direct/P577> | <http://www.wikidata.org/prop/direct/P1619> ) ?var2 . FILTER ( ( ( ?var2 >= "2017-09-07T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "2017-09-07T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: Is the film "Solsidan" classified as a film in Wikidata?

Does Solsidan belong to the category of films or any of their subclasses?

Is Solsidan a movie according to Wikidata’s classification?

ASK WHERE { <http://www.wikidata.org/entity/Q43128623> ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Qnull> . <http://www.bigdata.com/queryHints#Prior> <http://www.bigdata.com/queryHints#gearing> "forwards". }


Question: Which companies have Twitter accounts on Wikidata, and how many Wikipedia articles are about them?

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?twitter ( COUNT( ?site ) AS ?sitelinkCount ) WHERE {
  ?item wdt:P2002 ?twitter .
  VALUES ?twitter {
    "Bpifrance" "WeWork" "DUNOD" "SAFRAN"
  }
  ?site schema:about ?item ; schema:isPartOf ?wikipedia .
  FILTER ( STRSTARTS( STR( ?wikipedia ) , "https://" ) )
}
GROUP BY ?item ?twitter
ORDER BY ASC ( ?sitelinkCount )

What are the Twitter handles of companies like Bpifrance, WeWork, DUNOD, and SAFRAN, and how many Wikipedia language editions cover each?

List the Twitter usernames and the number of Wikipedia articles for Bpifrance, WeWork, DUNOD, and SAFRAN, sorted by the number of articles from least to most.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "treygagne" ) ( "philrod" ) ( "robin24h00" ) ( "WeWork" ) ( "DUNOD" ) ( "string2" ) ( "string3" ) ( "string4" ) ( "string5" ) ( "tsahaghian" ) ( "string6" ) ( "CityScoot" ) ( "BFleurose" ) ( "string7" ) ( "string8" ) ( "SAFRAN" ) ( "string9" ) ( "Bpifrance" ) ( "string10" ) } } ORDER BY ASC( ?var3 )


Question: What events happened on February 7, 1965?

SELECT DISTINCT ?event WHERE { ?event (wdt:P585 | wdt:P606 | wdt:P619 | wdt:P620 | wdt:P621 | wdt:P622 | wdt:P729 | wdt:P1191) ?date . FILTER ( ?date >= "1965-02-07T00:00:00Z"^^xsd:dateTime && ?date <= "1965-02-07T23:59:59Z"^^xsd:dateTime ) }

Which performances, spacecraft launches, military incidents, or other events are recorded as occurring on February 7, 1965, in Wikidata?

List all entities in Wikidata that have a timestamp (such as first performance, service entry, or first flight) on February 7, 1965.

SELECT DISTINCT ?var1 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P585> | <http://www.wikidata.org/prop/direct/P606> | <http://www.wikidata.org/prop/direct/P619> | <http://www.wikidata.org/prop/direct/P620> | <http://www.wikidata.org/prop/direct/P621> | <http://www.wikidata.org/prop/direct/P622> | <http://www.wikidata.org/prop/direct/P729> | <http://www.wikidata.org/prop/direct/P1191> ) ?var2 . FILTER ( ( ( ?var2 >= "1965-02-07T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1965-02-07T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: What is the most specific biological category that both Rihanna and Donald Trump belong to, based on their class hierarchies?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?ancestor ( ?dist1 + ?dist2 AS ?totalDistance ) WHERE {
  {
    SELECT ?ancestor ( COUNT( ?mid ) AS ?dist1 ) WHERE {
      wd:Q36844 wdt:P31 ?class1 .
      ?class1 wdt:P279 + ?mid .
      ?mid wdt:P279 * ?ancestor .
    }
    GROUP BY ?ancestor
  }
  {
    SELECT ?ancestor ( COUNT( ?mid ) AS ?dist2 ) WHERE {
      wd:Q22686 wdt:P31 ?class2 .
      ?class2 wdt:P279 + ?mid .
      ?mid wdt:P279 * ?ancestor .
    }
    GROUP BY ?ancestor
  }
}
ORDER BY ASC ( ?totalDistance )
LIMIT 1

Which common superclass, reached via subclass relationships, minimizes the total number of steps from the classes of Rihanna and Donald Trump?

Find the least specific shared ancestor class in the taxonomy of Rihanna and Donald Trump, measured by the sum of subclass steps from their respective 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/Q36844> ; <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: Events that occurred in January 1985

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?event WHERE {
  ?event wdt:P585 | wdt:P606 | wdt:P619 | wdt:P620 | wdt:P621 | wdt:P622 | wdt:P729 | wdt:P1191 ?date .
  FILTER(?date >= "1985-01-01T00:00:00Z" ^^ xsd:dateTime && ?date <= "1985-01-31T23:59:59Z" ^^ xsd:dateTime)
}

What events took place in January 1985, such as launches, performances, or service entries?

List all events in Wikidata that happened in January 1985, including first flights, spacecraft launches, elections, or premieres.

SELECT DISTINCT ?var1 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P585> | <http://www.wikidata.org/prop/direct/P606> | <http://www.wikidata.org/prop/direct/P619> | <http://www.wikidata.org/prop/direct/P620> | <http://www.wikidata.org/prop/direct/P621> | <http://www.wikidata.org/prop/direct/P622> | <http://www.wikidata.org/prop/direct/P729> | <http://www.wikidata.org/prop/direct/P1191> ) ?var2 . FILTER ( ( ( ?var2 >= "1985-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1985-01-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: Films with genres excluding shorts, TV episodes, fan films, and concert films.

What are the feature films that have a genre but are not short films, TV episodes, fan films, or other non-theatrical types?

List all mainstream feature films along with their genres, excluding TV-related, short, and niche film types like fan films or exploitation films.

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/entity/P1258> ?var3 . MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q24862> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q430525> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q653916> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q21191270> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q677466> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1067324> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1268687> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1933746> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1935609> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q2301591> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q2903140> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q18539720> . } MINUS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q20366042> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What is the type of the film Kick-Ass, and what are its broader categories?

SELECT ?type ?typeLabel ?superclass WHERE { wd:Q2201 wdt:P31 ?type . OPTIONAL { ?type wdt:P279 ?superclass . } OPTIONAL { ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel) = "en") } }

Types and superclasses of Kick-Ass movie.

Show me what kind of thing Kick-Ass is and what broader categories that type belongs to.

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


Question: Sculptors who died between 1501 and 1599, including their birth and death places with coordinates.

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/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
SELECT DISTINCT ?sculptor ?sculptorLabel ?dateOfBirth ?dateOfDeath ?placeOfBirth ?placeOfBirthLabel ?placeOfDeath ?placeOfDeathLabel ( CONCAT ( STR( ?latBirth ) , ", " , STR( ?longBirth ) ) AS ?birthCoordinates ) ( CONCAT ( STR( ?latDeath ) , ", " , STR( ?longDeath ) ) AS ?deathCoordinates ) WHERE {
  ?sculptor wdt:P106 wd:Q1281618 ; wdt:P569 ?dateOfBirth ; wdt:P570 ?dateOfDeath ; wdt:P19 ?placeOfBirth ; wdt:P20 ?placeOfDeath .
  FILTER ( YEAR( ?dateOfDeath ) >= 1501 && YEAR( ?dateOfDeath ) <= 1599 ) .
  ?placeOfBirth wdt:P625 ?coordBirth .
  BIND( geof:latitude ( ?coordBirth ) AS ?latBirth ) .
  BIND( geof:longitude ( ?coordBirth ) AS ?longBirth ) .
  ?placeOfDeath wdt:P625 ?coordDeath .
  BIND( geof:latitude ( ?coordDeath ) AS ?latDeath ) .
  BIND( geof:longitude ( ?coordDeath ) AS ?longDeath ) .
  ?sculptor rdfs:label ?sculptorLabel .
  ?placeOfBirth rdfs:label ?placeOfBirthLabel .
  ?placeOfDeath rdfs:label ?placeOfDeathLabel .
  FILTER ( LANG( ?sculptorLabel ) = "en" ) .
  FILTER ( LANG( ?placeOfBirthLabel ) = "en" ) .
  FILTER ( LANG( ?placeOfDeathLabel ) = "en" ) .
}
LIMIT 100

Who were the sculptors that died in the 16th century, and where were they born and died? Include their geographic coordinates.

List 16th-century sculptors with their dates of birth and death, places of birth and death, and the latitude-longitude coordinates of those places, all in English.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 ?var4Label ( CONCAT ( STR ( ?var5 ) , ", ", STR ( ?var6 ) ) AS ?var7 ) ?var8Label ( CONCAT ( STR ( ?var9 ) , ", ", STR ( ?var10 ) ) AS ?var11 ) WHERE { BIND ( YEAR ( ?var12 ) AS ?var13 ). ?var1 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q1281618> ; ( <http://www.wikidata.org/prop/P570> / <http://www.wikidata.org/prop/statement/value/P570> ) [ <http://wikiba.se/ontology#timeValue> ?var12 ; <http://wikiba.se/ontology#timePrecision> ?var14 ] . FILTER ( ( ( "1500-12-31"^^<http://www.w3.org/2001/XMLSchema#dateTime> < ?var12 ) && ( ?var12 < "1600-00-00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var14 >= "9"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . ?var1 <http://www.wikidata.org/prop/direct/P19> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P569> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P570> ?var3 . ?var4 <http://www.wikidata.org/prop/direct/P625> ?var15 . ?var4 <http://www.wikidata.org/prop/P625> ?var16 . ?var16 <http://www.wikidata.org/prop/statement/value/P625> ?var17 . ?var17 <http://wikiba.se/ontology#geoLatitude> ?var5 . ?var17 <http://wikiba.se/ontology#geoLongitude> ?var6 . ?var1 <http://www.wikidata.org/prop/direct/P20> ? ?var8 . ?var8 <http://www.wikidata.org/prop/direct/P625> ?var18 . ?var8 <http://www.wikidata.org/prop/P625> ?var19 . ?var19 <http://www.wikidata.org/prop/statement/value/P625> ?var20 . ?var20 <http://wikiba.se/ontology#geoLatitude> ?var9 . ?var20 <http://wikiba.se/ontology#geoLongitude> ?var10 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr,en". } }


Question: What is the most specific shared category (via subclass hierarchy) between a human and a sovereign state?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?ancestor(?dist1 + ?dist2 AS ?totalDistance) WHERE {
  {
    SELECT ?ancestor(COUNT(?mid) AS ?dist1) WHERE {
      wd:Q5 wdt:P279 + ?mid .
      ?mid wdt:P279 * ?ancestor .
    }
    GROUP BY ?ancestor
  }
  {
    SELECT ?ancestor(COUNT(?mid) AS ?dist2) WHERE {
      wd:Q3624078 wdt:P279 + ?mid .
      ?mid wdt:P279 * ?ancestor .
    }
    GROUP BY ?ancestor
  }
}
ORDER BY ASC(?totalDistance)
LIMIT 1

Which concept is the closest common ancestor in the Wikidata taxonomy for a person like Kathy Dahlkemper and a country like Germany?

Find the most specific superclass that both humans and sovereign states belong to, measured by the sum of subclass distances.

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/Q3813932> ; <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 is the most specific common category that both Broadcom and the United States belong to?

SELECT DISTINCT ?commonClass ?commonClassLabel WHERE { wd:Q555925 wdt:P31 ?bType . wd:Q30 wdt:P31 ?uType . VALUES ?commonClass { wd:Q155076 } . ?bType wdt:P279* ?commonClass . ?uType wdt:P279* ?commonClass . ?commonClass rdfs:label ?commonClassLabel . FILTER(LANG(?commonClassLabel) = "en") }

What superclass do the types of Broadcom and the United States have in common?

What is the shared classification category for Broadcom and the United States 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/Q555925> ; <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/Q30> ; <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 common given names of people born in France

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?givenName ?givenNameLabel(COUNT(*) AS ?count) WHERE {
  ?person wdt:P19 wd:Q142 .
  ?person wdt:P735 ?givenName .
  OPTIONAL {
    ?givenName rdfs:label ?givenNameLabel .
    FILTER(LANG(?givenNameLabel) = "en")
  }
}
GROUP BY ?givenName ?givenNameLabel
ORDER BY DESC(?count) ASC(?givenNameLabel)
LIMIT 50

What are the most popular given names among people born in France, and how many people have each name?

List the top 50 given names of people born in France, along with their English labels and frequency counts, sorted by popularity.

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


Question: Research projects that started between 2012 and 2022 and ended between 2022 and 2032.

Which research initiatives began between 2012 and 2022 and concluded between 2022 and 2032?

Show me entities (like scientific projects or programs) that were active around 2022 — meaning they started no earlier than 2012 and ended no later than 2032.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var3 . FILTER ( ( ( ?var2 >= "12-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "22-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var3 >= "22-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var3 <= "32-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: English and German Wikipedia pages for the movie with IMDb ID tt1531911

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?movie ?wikipedia_page WHERE {
  ?movie wdt:P345 "tt1531911" .
  ?wikipedia_page schema:about ?movie ; schema:inLanguage ?lang .
  VALUES ?lang {
    "en" "de"
  }
}

What are the English and German Wikipedia articles about the movie with IMDb ID tt1531911?

Show me the English and German Wikipedia links for the movie identified by tt1531911 on IMDb.

SELECT ?var1 ?var2 ?var3 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt1531911". } ?var2 <http://schema.org/about> ?var1 . { ?var2 <http://schema.org/inLanguage> "en". } UNION { ?var2 <http://schema.org/inLanguage> "de". } ?var1 <http://www.wikidata.org/prop/direct/P345> ?var3 . 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 Facebook and Microsoft belong to?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonSuper(COUNT(?super) AS ?depth) WHERE {
  {
    wd:Q355 wdt:P31 ?fbClass .
    ?fbClass wdt:P279 * ?commonSuper .
    FILTER(?commonSuper != ?fbClass)
  }
  {
    wd:Q2283 wdt:P31 ?msClass .
    ?msClass wdt:P279 * ?commonSuper .
    FILTER(?commonSuper != ?msClass)
  }
  ?commonSuper wdt:P279 + ?super .
}
GROUP BY ?commonSuper
ORDER BY DESC(?depth)
LIMIT 1

What is the highest-level common classification that includes both Facebook and Microsoft?

What is the most general type that encompasses both Facebook's and Microsoft's categories?

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/Q355> ; <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/Q2283> ; <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: Items in South Australia with German Wikipedia pages but no English Wikipedia pages, ordered by total Wikipedia links.

PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?itemLabel ( COUNT( ?wp ) AS ?sitelinkCount ) ?deWp WHERE {
  ?item wdt:P131 wd:Q35715 .
  ?item rdfs:label ?itemLabel .
  FILTER ( LANG( ?itemLabel ) = "en" ) .
  ?wp schema:about ?item ; schema:isPartOf ?wpSite .
  ?deWp schema:about ?item ; schema:inLanguage "de" ; schema:isPartOf <https://de.wikipedia.org/> .
  FILTER NOT EXISTS {
    ?enWp schema:about ?item ; schema:inLanguage "en" ; schema:isPartOf <https://en.wikipedia.org/> .
  }
}
GROUP BY ?item ?itemLabel ?deWp
ORDER BY DESC ( ?sitelinkCount )

Which places in South Australia have a German Wikipedia article but no English one, and how many language versions of Wikipedia link to them?

Show me all locations in South Australia that are linked to the German Wikipedia but not the English Wikipedia, along with their English names and the total number of Wikipedia links they have.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q35715> . ?var1 <http://wikiba.se/ontology#sitelinks> ?var2 . FILTER ( ( ( ?var2 >= "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . FILTER ( ( NOT EXISTS { ?var4 <http://schema.org/about> ?var1 . ?var4 <http://schema.org/inLanguage> "en". ?var4 <http://schema.org/isPartOf> <https://en.wikipedia.org/> . } ) ) . FILTER ( ( EXISTS { ?var5 <http://schema.org/about> ?var1 . ?var5 <http://schema.org/inLanguage> "de". ?var5 <http://schema.org/isPartOf> <https://de.wikipedia.org/> . ?var5 <http://schema.org/fileFormat> ?var3 . } ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,de,es,ar,fr". } } GROUP BY ?var1 ?var1Label ?var2 ?var3 ORDER BY DESC( ?var2 )


Question: What class do Uma Thurman and Christian Horner both belong to?

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

What is the most specific category that both Uma Thurman and Christian Horner are instances of?

Show me the common type shared by Uma Thurman and Christian Horner.

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/Q125017> ; <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/Q173472> ; <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 main categories that Zachary Taylor and the band Neu! belong to in Wikidata?

SELECT ?entity ?class ?label WHERE { VALUES ?entity { wd:Q11896 wd:Q181874 } ?entity wdt:P31 ?class . OPTIONAL { ?class rdfs:label ?label . FILTER(LANG(?label) = "en") } } ORDER BY ?entity

Is there any shared classification between U.S. president Zachary Taylor and the German rock band Neu!?

What class does each of these entities belong to: Zachary Taylor and Neu!?

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/Q11896> ; <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/Q181874> ; <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 items in Wikidata have a defined start time, and when did they begin?

SELECT ?itemLabel ?item ?startTime WHERE { ?item wdt:P580 ?startTime . FILTER(STRSTARTS(STR(?item), "http://www.wikidata.org/entity/Q")) . ?item rdfs:label ?itemLabel . }

Can you list entities with their start dates, such as the Universe?

Show me the names and start times of all entities in Wikidata that have a direct beginning date.

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


Question: Entities with blank node instance-of values and inception dates

SELECT DISTINCT ?item ?itemLabel ?date WHERE { ?item wdt:P31 ?type . ?item wdt:P571 ?date . FILTER (isBLANK(?type)) . ?item rdfs:label ?itemLabel . FILTER (LANG(?itemLabel) = "en") } LIMIT 10000

Which entities in Wikidata have malformed instance-of statements (blank nodes) and a known founding or inception date?

List entities that have at least one blank node as their type (P31) and also have a recorded inception date (P571), along with their English labels and dates.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var3 . ?var1 <http://www.wikidata.org/prop/direct/P571> ?var2 . FILTER ( ( isBLANK ( ?var3 ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } } LIMIT 10000


Question: What is the most specific common superclass of Sarah Silverman and Berlin in Wikidata?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?ancestor WHERE {
  wd:Q229013 wdt:P31 ?c1 .
  wd:Q64 wdt:P31 ?c2 .
  ?c1 wdt:P279 * wd:Q53617489 .
  ?c2 wdt:P279 * wd:Q53617489 .
  BIND(wd:Q53617489 AS ?ancestor)
}
LIMIT 1

Which class is the closest common ancestor in the subclass hierarchy between the entity representing Sarah Silverman and the entity representing Berlin?

Find the most specific class that is a superclass of all classes that Sarah Silverman and Berlin 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/Q229013> ; <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 category that both Elon Musk and Kim Jong belong to?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?ancestor WHERE {
  wd:Q317521 wdt:P31 ?type1 .
  wd:Q6408963 wdt:P31 ?type2 .
  ?type1 wdt:P279 * ?ancestor .
  ?type2 wdt:P279 * ?ancestor .
  FILTER ( ?ancestor = wd:Q5 )
}

What do Elon Musk and Kim Jong have in common in terms of their classification in Wikidata?

What is the highest-level shared type for Elon Musk and the North Korean table tennis player Kim Jong?

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/Q317521> ; <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/Q6408963> ; <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 common organizational category that both NHK and Reuters belong to?

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

What is the highest-level entity that classifies both NHK and Reuters as instances?

What is the common ancestor class in Wikidata for NHK and Reuters?

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/Q212128> ; <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/Q130879> ; <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: List U.S. locations with their FIPS 55-3 codes.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?locationLabel ?location ?fipsCode WHERE {
  ?location wdt:P774 ?fipsCode .
  ?location rdfs:label ?locationLabel .
  FILTER ( LANG( ?locationLabel ) = "en" )
}
LIMIT 10

What are the English-labeled U.S. places and their corresponding FIPS 55-3 identification codes?

Show me up to 10 U.S. geographic locations along with their FIPS 55-3 codes and English names.

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


Question: Twitter handles KonbiniFr and afptehran, ordered by number of Wikipedia pages

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?twitterHandle(COUNT(?sitelink) AS ?sitelinkCount) WHERE {
  ?item wdt:P2002 ?twitterHandle .
  ?sitelink schema:about ?item ; schema:isPartOf ?wikipediaSite .
  VALUES ?twitterHandle {
    "KonbiniFr" "afptehran"
  }
}
GROUP BY ?item ?twitterHandle
ORDER BY ASC(?sitelinkCount)

Which entities have the Twitter handles "KonbiniFr" or "afptehran", and how many Wikipedia articles are linked to each?

Show me the entities with Twitter handles "KonbiniFr" and "afptehran", sorted by the number of Wikipedia sitelinks they have, from least to most.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "konbinifr" ) ( "string2" ) ( "afptehran" ) ( "KonbiniFr" ) ( "string3" ) ( "string4" ) ( "krstv" ) } } ORDER BY ASC( ?var3 )


Question: What is the most specific category that both Bruce Arians and The Verge 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 ?label WHERE {
  wd:Q5 wdt:P279 * ?common .
  wd:Q17232649 wdt:P279 * ?common .
  ?common rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}
ORDER BY DESC(STRLEN(?label))
LIMIT 1

What common superclass do the types of Bruce Arians and The Verge share?

Which entity class includes both humans and news websites like The Verge?

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/Q4046340> ; <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/Q2155442> ; <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: Historical events that started between 1881 and 1891 and ended between 1891 and 1901.

Which historical events began in the 1880s and ended in the 1890s or early 1900s?

Show me temporary entities or events that started between 1881 and 1891 and concluded between 1891 and 1901.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var3 . FILTER ( ( ( ?var2 >= "1881-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1891-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var3 >= "1891-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var3 <= "1901-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: What cultural events started between 1961 and 1971 and ended between 1971 and 1981?

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?item WHERE {
  ?item wdt:P580 ?start .
  ?item wdt:P582 ?end .
  FILTER ( ?start >= "1961-01-01T00:00:00Z" ^^ xsd:dateTime && ?start <= "1971-12-31T23:59:59Z" ^^ xsd:dateTime ) FILTER ( ?end >= "1971-01-01T00:00:00Z" ^^ xsd:dateTime && ?end <= "1981-12-31T23:59:59Z" ^^ xsd:dateTime )
}

List events that began in the 1960s and ended in the 1970s.

Show me projects with a start date from January 1, 1961 to December 31, 1971, and an end date from January 1, 1971 to December 31, 1981.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var3 . FILTER ( ( ( ?var2 >= "1961-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1971-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var3 >= "1971-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var3 <= "1981-12-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: What are the names of days in the Eastern Orthodox liturgical calendar, and do any of them have associated images?

SELECT ?day ?dayLabel ?image WHERE { ?day wdt:P31 wd:Q47164206 . ?day rdfs:label ?dayLabel . FILTER (langMatches(lang(?dayLabel), "en")) OPTIONAL { ?day wdt:P18 ?image . } } ORDER BY ?dayLabel LIMIT 100

List the English names of days observed in the Eastern Orthodox liturgical calendar, along with any images available on Wikimedia Commons.

Can you show me up to 100 Eastern Orthodox liturgical dates in English, and if available, their corresponding images?

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


Question: What administrative regions include the City of Sydney, including itself?

SELECT ?administrativeEntity ?administrativeEntityLabel WHERE { wd:Q1094194 wdt:P131* ?administrativeEntity . ?administrativeEntity rdfs:label ?administrativeEntityLabel . FILTER(LANG(?administrativeEntityLabel) = "en")}

What are all the administrative territories that the City of Sydney is part of, going up to the country level?

List all administrative entities that contain the City of Sydney, from the local level up to the country, along with their names.

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


Question: Events that started between 1990 and 2000 and ended between 2000 and 2010

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?item WHERE {
  ?item wdt:P580 ?start .
  ?item wdt:P582 ?end .
  FILTER(?start >= "1990-06-11T00:00:00Z" ^^ xsd:dateTime && ?start <= "2000-06-11T23:59:59Z" ^^ xsd:dateTime)
  FILTER(?end >= "2000-06-11T00:00:00Z" ^^ xsd:dateTime && ?end <= "2010-06-11T23:59:59Z" ^^ xsd:dateTime)
}

Which events began in the 1990s and ended in the 2000s?

Show me all entities (like exhibitions or projects) that started between June 11, 1990 and June 11, 2000, and ended between June 11, 2000 and June 11, 2010.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var3 . FILTER ( ( ( ?var2 >= "1990-06-11T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "2000-06-11T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var3 >= "2000-06-11T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var3 <= "2010-06-11T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: People with Twitter usernames YLeBolloch or SemounElie

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?person ?twitterUsername WHERE {
  ?person wdt:P2002 ?twitterUsername .
  VALUES ?twitterUsername {
    "YLeBolloch" "SemounElie"
  }
}

Who are the people on Wikidata that use the Twitter handles YLeBolloch and SemounElie?

Show me the Wikidata entities linked to the Twitter accounts YLeBolloch and SemounElie.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "BenoitBK" ) ( "string3" ) ( "BonettiLou" ) ( "string4" ) ( "string5" ) ( "Undreamerz" ) ( "Couni63" ) ( "RomuBelier" ) ( "string6" ) ( "YLeBolloch" ) ( "adora56" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "SemounElie" ) ( "gui_gabb" ) } } ORDER BY ASC( ?var3 )


Question: List Australian territories with their coordinates, Freebase IDs, and administrative entities.

SELECT DISTINCT ?territoryLabel ?adminEntityLabel ?lat ?long ?freebaseId WHERE { ?territory (wdt:P31/wdt:P279*) wd:Q14192199 . ?territory wdt:P625 ?coord . BIND(geof:latitude(?coord) AS ?lat) BIND(geof:longitude(?coord) AS ?long) ?territory wdt:P131 ?adminEntity . ?territory wdt:P646 ?freebaseId . OPTIONAL { ?territory rdfs:label ?territoryLabel . FILTER(LANG(?territoryLabel) = "en") } OPTIONAL { ?adminEntity rdfs:label ?adminEntityLabel . FILTER(LANG(?adminEntityLabel) = "en") } } ORDER BY ASC(?territoryLabel)

What are the English names, geographic coordinates, Freebase IDs, and administrative regions of all Australian territories?

Show me the English labels, latitude, longitude, Freebase IDs, and the administrative entity each Australian territory belongs to.

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


Question: What are the human settlements located in the Alice Springs local government area?

SELECT ?settlement ?settlementLabel WHERE { ?settlement (wdt:P31/wdt:P279*) wd:Q486972 . ?settlement wdt:P131 wd:Q768033 . ?settlement rdfs:label ?settlementLabel . FILTER(LANG(?settlementLabel) = "en") } ORDER BY ASC(?settlementLabel)

List all towns and populated places in the Alice Springs region of Australia’s Northern Territory, sorted alphabetically.

Can you show me the names of all inhabited places in the Alice Springs local government area, including suburbs and smaller settlements?

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


Question: What company has the Twitter/X username "Equinor_DE"?

SELECT ?company ?twitterUsername WHERE { ?company wdt:P2002 ?twitterUsername . VALUES ?twitterUsername { "Equinor_DE" } }

Which Wikidata entity is linked to the Twitter handle Equinor_DE?

Find the company associated with the Twitter account Equinor_DE.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "Statoil_DE" ) ( "string1" ) } }


Question: What is the most specific category that both The New York Times and Jay Clayton belong to?

SELECT ?commonClass ?label WHERE { wd:Q9684 wdt:P31 ?type1 . wd:Q28122984 wdt:P31 ?type2 . ?type1 wdt:P279* ?commonClass . ?type2 wdt:P279* ?commonClass . ?commonClass rdfs:label ?label . FILTER(LANG(?label) = 'en') } ORDER BY ASC(?commonClass) LIMIT 1

What is the highest-level common classification shared by The New York Times and Jay Clayton?

What type encompasses both newspapers and humans, according to 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/Q9684> ; <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/Q28125519> ; <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 and values describe the concept of a Wikipedian on Wikidata?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?prop ?propLabel ?propValue ?propValueLabel WHERE {
  wd:Q23038345 ?prop ?propValue .
  OPTIONAL {
    ?prop rdfs:label ?propLabel .
    FILTER ( LANG( ?propLabel ) = "en" )
  }
  OPTIONAL {
    ?propValue rdfs:label ?propValueLabel .
    FILTER ( LANG( ?propValueLabel ) = "en" )
  }
}
ORDER BY ?prop

Can you list the metadata associated with the Wikidata item for "Wikipedian"?

What are the labels and related entities for the occupation "Wikipedian" in Wikidata?

SELECT ?var1 ?var1Label ?var2 ?var3 ?var3Label ?var4 ?var5 WHERE { { BIND ( <http://www.wikidata.org/entity/Q23038345> AS ?var1 ). ?var1 ?var6 ?var7 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var2 . } ?var3 ?var8 ?var6 . ?var3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . FILTER ( ( STRSTARTS ( STR ( ?var7 ) , "string1" ) ) ) . FILTER ( ( STRSTARTS ( STR ( ?var3 ) , "string2" ) ) ) . } UNION { BIND ( "EFFBD8" AS ?var5 ). <http://www.wikidata.org/entity/Q23038345> ?var6 ?var3 . OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P18> ?var4 . } ?var1 ?var8 ?var6 . ?var1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . FILTER ( ( STRSTARTS ( STR ( ?var3 ) , "string1" ) ) ) . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var2 . ?var3 <http://www.wikidata.org/prop/direct/P18> ?var4 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sq". } }


Question: List all territorial authorities in New Zealand with their English names and geographic coordinates.

SELECT DISTINCT ?item ?label ?lat ?lon WHERE { ?item wdt:P31 wd:Q941036 . ?item wdt:P625 ?coord . BIND(geof:latitude(?coord) AS ?lat) BIND(geof:longitude(?coord) AS ?lon) OPTIONAL { ?item rdfs:label ?label . FILTER(LANG(?label) = "en") } } ORDER BY ASC(?label)

What are the names and coordinates of all unitary authorities in New Zealand?

Please provide the English labels and latitude/longitude for each territorial authority in New Zealand.

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


Question: Entities that began between 1910 and 1920 and ended between 1920 and 1930.

SELECT DISTINCT ?item WHERE { ?item wdt:P580 ?startTime . ?item wdt:P582 ?endTime . FILTER ( ?startTime >= "1910-06-01T00:00:00Z"^^xsd:dateTime && ?startTime <= "1920-06-30T23:59:59Z"^^xsd:dateTime ) FILTER ( ?endTime >= "1920-06-01T00:00:00Z"^^xsd:dateTime && ?endTime <= "1930-06-30T23:59:59Z"^^xsd:dateTime ) }

Which organizations or governments started in the 1910s and ceased operation in the 1920s?

List historical entities that were active from the 1910s through the early 1920s, with start and end dates in those ranges.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var3 . FILTER ( ( ( ?var2 >= "1910-06-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "1920-06-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var3 >= "1920-06-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var3 <= "1930-06-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }


Question: Which Twitter/X accounts from this list (RFI, Benzema, CAF_Online, etc.) have the fewest Wikipedia pages, and how many?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?item ?username(COUNT(?page) AS ?sitelinkCount) WHERE {
  ?item wdt:P2002 ?username .
  ?page schema:about ?item ; schema:isPartOf ?site .
  VALUES ?username {
    "RFI" "Europe1" "Elkhedra" "LesVerts" "sffeghouli" "adlenmeddi" "bylka613" "Ryadbdz" "1Filtre" "CAF_Online" "bilali78" "ouss_o" "riouyoann" "Benzema"
  }
}
GROUP BY ?item ?username
ORDER BY ASC(?sitelinkCount)

For the given Twitter usernames like Benzema and RFI, which ones are linked to the least number of Wikipedia language editions, and how many editions do they have?

List the Wikidata items corresponding to these Twitter usernames — RFI, Benzema, CAF_Online, and others — sorted by how many Wikipedia pages they have, from least to most.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "RFI" ) ( "Europe1" ) ( "string3" ) ( "string4" ) ( "Elkhedra" ) ( "string5" ) ( "LesVerts" ) ( "string6" ) ( "sffeghouli" ) ( "string7" ) ( "adlenmeddi" ) ( "bylka613" ) ( "string8" ) ( "Ryadbdz" ) ( "1Filtre" ) ( "string9" ) ( "string10" ) ( "CAF_Online" ) ( "string11" ) ( "string12" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "bilali78" ) ( "ouss_o" ) ( "riouyoann" ) ( "string17" ) ( "Benzema" ) } } ORDER BY ASC( ?var3 )


Question: Cycling team seasons that started between November 1992 and November 2002 and ended between November 2002 and November 2012.

SELECT DISTINCT ?item WHERE { ?item wdt:P580 ?startDate . ?item wdt:P582 ?endDate . FILTER ( ?startDate >= "1992-11-01T00:00:00Z"^^xsd:dateTime && ?startDate <= "2002-11-30T23:59:59Z"^^xsd:dateTime ) FILTER ( ?endDate >= "2002-11-01T00:00:00Z"^^xsd:dateTime && ?endDate <= "2012-11-30T23:59:59Z"^^xsd:dateTime ) }

Which sports team seasons were active around the year 2002, starting in the late 1990s to early 2000s and ending in the early 2010s?

List all annual sports teams or events that began between late 1992 and late 2002 and concluded between late 2002 and late 2012.

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P582> ?var3 . FILTER ( ( ( ?var2 >= "1992-11-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "2002-11-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . FILTER ( ( ( ?var3 >= "2002-11-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var3 <= "2012-11-31T23:59:59Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . }