Question: Which organizations have Twitter accounts UN, thebeatles, HarvardBiz, EFF, nytimes, or nypost?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?twitter WHERE {
  ?item wdt:P2002 ?twitter .
  VALUES ?twitter {
    "UN" "thebeatles" "HarvardBiz" "EFF" "nytimes" "nypost"
  }
}

What are the Wikidata items for the Twitter handles @UN, @thebeatles, @HarvardBiz, @EFF, @nytimes, and @nypost?

Show me the Wikidata entities corresponding to the Twitter usernames UN, thebeatles, HarvardBiz, EFF, nytimes, and nypost.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "metrofire" ) ( "string1" ) ( "jpwarren" ) ( "La_Chat_9" ) ( "string2" ) ( "RitaCobix" ) ( "Biagio960" ) ( "string3" ) ( "Wittylama" ) ( "string4" ) ( "string5" ) ( "qzafrica" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "ulrikagood" ) ( "spaceyliz" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "rsarvas" ) ( "string13" ) ( "arranjrees" ) ( "mcterwey" ) ( "7twan" ) ( "string14" ) ( "linnogelid" ) ( "nypost" ) ( "string15" ) ( "Bleeptrack" ) ( "beetlesbot" ) ( "HarvardBiz" ) ( "string16" ) ( "KGrabarska" ) ( "string17" ) ( "string18" ) ( "string19" ) ( "string20" ) ( "greed2411" ) ( "string21" ) ( "string22" ) ( "string23" ) ( "jnrbaker" ) ( "kringln" ) ( "string24" ) ( "kollarp" ) ( "PP_Rubens" ) ( "string25" ) ( "string26" ) ( "string27" ) ( "EFF" ) ( "string28" ) ( "string29" ) ( "LetsGoKato" ) ( "NYTimes" ) ( "Brindille_" ) ( "string30" ) ( "svtnyheter" ) ( "lenahemma" ) ( "string31" ) ( "string32" ) ( "string33" ) ( "Y2SHAF" ) ( "string34" ) ( "string35" ) ( "lchu3n" ) ( "string36" ) ( "string37" ) } } ORDER BY ASC( ?var3 )


Question: What are the Catalan labels and descriptions of properties related to date of birth (P569) in Wikidata?

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

Which properties in Wikidata are considered related to the date of birth, and what are their Catalan labels and descriptions?

Show me the Catalan labels and descriptions of all properties that are marked as related to the date of birth property (P569).

SELECT ?var1 ?var2Label ?var3 WHERE { BIND ( <http://www.wikidata.org/prop/P569> AS ?var4 ). ?var5 ?var6 ?var4 . ?var5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . ?var5 <http://www.wikidata.org/prop/direct/P1659> ?var1 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var1 <http://schema.org/description> ?var3 . FILTER ( ( ( LANG ( ?var2Label ) = "ca" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "ca" ) ) ) . }


Question: Films released in Germany in 1997, excluding TV movies and other distribution formats.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?film ?pubDate ?filmTitle WHERE {
  ?film wdt:P31 / wdt:P279 * wd:Q11424 .
  ?film p:P577 ?pubStatement .
  ?pubStatement ps:P577 ?pubDate .
  ?pubStatement(psv:P577 / wikibase:timePrecision) "11" ^^ xsd:integer .
  FILTER(YEAR(?pubDate) = 1997)
  ?pubStatement pq:P291 wd:Q183 .
  FILTER(NOT EXISTS {
    ?pubStatement wikibase:rank wikibase:DeprecatedRank
  })
  FILTER(NOT EXISTS {
    ?pubStatement pq:P400 ?platform
  })
  FILTER(NOT EXISTS {
    ?pubStatement pq:P437 ?format
  })
  FILTER(NOT EXISTS {
    ?film wdt:P31 wd:Q506240
  })
  ?film wdt:P1476 ?filmTitle .
}
ORDER BY ASC(?pubDate) ASC(?filmTitle)

What films were first released in Germany in 1997, and what were their release dates?

List all cinema films published in Germany in 1997, sorted by release date, excluding television films and platform-specific releases.

SELECT ?var1 ?var2 ?var1Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q11424> . ?var1 <http://www.wikidata.org/prop/P577> ?var3 . ?var3 ( <http://www.wikidata.org/prop/statement/value/P577> / <http://wikiba.se/ontology#timePrecision> ) "11"^^<http://www.w3.org/2001/XMLSchema#integer> . ?var3 <http://www.wikidata.org/prop/statement/P577> ?var2 . FILTER ( ( ( YEAR ( ?var2 ) = "1997"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . ?var3 <http://www.wikidata.org/prop/qualifier/P291> <http://www.wikidata.org/entity/Q183> . FILTER ( ( NOT EXISTS { ?var3 <http://wikiba.se/ontology#rank> <http://wikiba.se/ontology#DeprecatedRank> . } ) ) . FILTER ( ( NOT EXISTS { ?var3 <http://www.wikidata.org/prop/qualifier/P400> ?var4 . } ) ) . FILTER ( ( NOT EXISTS { ?var3 <http://www.wikidata.org/prop/qualifier/P437> ?var5 . } ) ) . FILTER ( ( NOT EXISTS { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q506240> . } ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "de". } } ORDER BY ASC( ?var2 )ASC( ?var1Label )


Question: List all comic book issues in the Spike and Suzy series with their publication dates.

SELECT ?comicIssue ?comicLabel ?publicationDate WHERE { ?comicIssue wdt:P179 wd:Q1240821 . ?comicIssue rdfs:label ?comicLabel . OPTIONAL { ?comicIssue wdt:P577 ?publicationDate . } }

What are the comic book issues that belong to the Spike and Suzy series, and when were they published?

Show me the titles and publication dates of all comic books in the Spike and Suzy series.

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


Question: Properties and values describing Mahaich Nadi with English labels for entities.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
SELECT ?propertyItem ?propertyItemLabel ?value ?valueLabel WHERE {
  wd:Q35449518 ?directProperty ?value .
  ?propertyItem wikibase:directClaim ?directProperty .
  ?propertyItem rdfs:label ?propertyItemLabel .
  OPTIONAL {
    ?value rdfs:label ?valueLabel .
    FILTER(LANG(?valueLabel) = "en")
  }
}
LIMIT 100

What properties are used to describe Mahaich Nadi, and what are their labels and values?

Show me the properties and their labels that are used to describe Mahaich Nadi, along with their values and any English labels for those values.

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


Question: What properties are used to link entities to glutamine in Wikidata?

SELECT DISTINCT ?propertyItem ?propertyItemLabel WHERE { ?item ?property wd:Q181619 . ?propertyItem wikibase:directClaim ?property . ?propertyItem rdfs:label ?propertyItemLabel . FILTER(LANG(?propertyItemLabel) = "en") } LIMIT 100

Which properties connect items to the amino acid glutamine, and what are their labels?

List all properties that have glutamine (Q181619) as their object, along with their English labels.

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


Question: What identifier values are associated with Rihanna?

PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?prop ?val WHERE {
  wd:Q36844 ?prop ?val .
  FILTER ( isLiteral( ?val ) )
}

Which properties with literal values are used for Rihanna?

Can you list all the external IDs linked to Rihanna in Wikidata?

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


Question: What are the core cities of Japan?

SELECT ?city ?cityLabel WHERE { ?city wdt:P31 wd:Q1137833 . ?city rdfs:label ?cityLabel . FILTER(LANG(?cityLabel) = "en") } LIMIT 100

List of core cities in Japan with their English names

Show me the English names of all cities in Japan that have the status of a core city

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


Question: What are the English names, scientific names, and parent taxa of biological species?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?taxonLabel ?taxon ?scientificName ?parentTaxon WHERE {
  ?taxon rdfs:label ?taxonLabel .
  FILTER(LANGMATCHES(LANG(?taxonLabel) , "en"))
  ?taxon wdt:P225 ?scientificName .
  ?taxon wdt:P171 ?parentTaxon .
}
LIMIT 100

Show me a list of 100 taxa with their English labels, scientific names, and higher taxonomic groups.

Can you provide the common names, Latin names, and parent taxa for biological taxa in English?

SELECT DISTINCT ?var1Label ?var2 ?var3 ?var4 WHERE { ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( LANGMATCHES ( LANG ( ?var1Label ) , "EN" ) ) ) . ?var2 <http://www.wikidata.org/prop/direct/P225> ?var3 . ?var2 <http://www.wikidata.org/prop/direct/P171> ?var4 . } LIMIT 100


Question: What are the names of douars in Morocco?

SELECT DISTINCT ?douar ?douarLabel WHERE { ?douar wdt:P31 wd:Q23925393 . ?douar rdfs:label ?douarLabel . FILTER(LANG(?douarLabel) = "en") } LIMIT 111

Can you list the English-labeled douars located in Morocco?

Show me up to 111 douars in Morocco and their English names.

SELECT DISTINCT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q23925393> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q1028> . } LIMIT 111


Question: What properties and subjects are connected to PSPACE in Wikidata?

PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?subject ?property WHERE {
  ?subject ?property wd:Q500716 .
}

What things are related to the complexity class PSPACE, and how are they connected?

Show me all the relationships that involve PSPACE as an object in Wikidata.

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/Q500716> . }


Question: What is the most closely related common superclass of the airline Nature Air and the band Neu!?

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( ?step ) AS ?dist1 ) WHERE {
      wd:Q980781 wdt:P31 ?class1 .
      ?class1 wdt:P279 + ?step .
      ?step wdt:P279 * ?ancestor .
      FILTER ( ?ancestor != ?class1 )
    }
    GROUP BY ?ancestor
    ORDER BY ASC ( ?dist1 )
    LIMIT 10
  }
  {
    SELECT ?ancestor ( COUNT( ?step ) AS ?dist2 ) WHERE {
      wd:Q181874 wdt:P31 ?class2 .
      ?class2 wdt:P279 + ?step .
      ?step wdt:P279 * ?ancestor .
      FILTER ( ?ancestor != ?class2 )
    }
    GROUP BY ?ancestor
    ORDER BY ASC ( ?dist2 )
    LIMIT 10
  }
}
ORDER BY ASC ( ?totalDistance )
LIMIT 1

Which entity is the nearest common ancestor in the subclass hierarchy between the German rock band Neu! and the airline Nature Air?

Find the organization that is the shortest common ancestor in the subclass tree of both Nature Air and Neu!, and show the total number of subclass steps from each.

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/Q980781> ; <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 is the most general category that both Jos Verstappen and SpaceX belong to, based on their types and their shortest paths in the subclass hierarchy?

SELECT ?commonAncestor (MIN(?dist1) + MIN(?dist2) AS ?totalDistance)
WHERE {
  {
    SELECT ?commonAncestor (MIN(?d1) AS ?dist1)
    WHERE {
      wd:Q173145 wdt:P31 ?type1 .
      {
        ?type1 wdt:P279 ?commonAncestor . BIND(1 AS ?d1)
      } UNION {
        ?type1 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?commonAncestor . BIND(2 AS ?d1)
      } UNION {
        ?type1 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?mid2 . ?mid2 wdt:P279 ?commonAncestor . BIND(3 AS ?d1)
      } UNION {
        ?type1 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?mid2 . ?mid2 wdt:P279 ?mid3 . ?mid3 wdt:P279 ?commonAncestor . BIND(4 AS ?d1)
      } UNION {
        ?type1 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?mid2 . ?mid2 wdt:P279 ?mid3 . ?mid3 wdt:P279 ?mid4 . ?mid4 wdt:P279 ?commonAncestor . BIND(5 AS ?d1)
      }
    }
    GROUP BY ?commonAncestor
  }
  {
    SELECT ?commonAncestor (MIN(?d2) AS ?dist2)
    WHERE {
      wd:Q193701 wdt:P31 ?type2 .
      {
        ?type2 wdt:P279 ?commonAncestor . BIND(1 AS ?d2)
      } UNION {
        ?type2 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?commonAncestor . BIND(2 AS ?d2)
      } UNION {
        ?type2 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?mid2 . ?mid2 wdt:P279 ?commonAncestor . BIND(3 AS ?d2)
      } UNION {
        ?type2 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?mid2 . ?mid2 wdt:P279 ?mid3 . ?mid3 wdt:P279 ?commonAncestor . BIND(4 AS ?d2)
      } UNION {
        ?type2 wdt:P279 ?mid1 . ?mid1 wdt:P279 ?mid2 . ?mid2 wdt:P279 ?mid3 . ?mid3 wdt:P279 ?mid4 . ?mid4 wdt:P279 ?commonAncestor . BIND(5 AS ?d2)
      }
    }
    GROUP BY ?commonAncestor
  }
}
GROUP BY ?commonAncestor
ORDER BY ASC(?totalDistance)
LIMIT 1

Which superclass is closest to both the human Jos Verstappen and the company SpaceX when tracing their type hierarchies?

Find the common ancestor in the Wikidata taxonomy that minimizes the sum of the shortest paths from Jos Verstappen’s and SpaceX’s 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/Q173145> ; <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/Q193701> ; <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: Images, locations, and employer of Magnus Knuth

SELECT DISTINCT ?image ?organization ?organizationLabel ?coordinates ?propertyLabel WHERE { wd:Q30342960 ?propertyStatement ?organization . ?property wikibase:directClaim ?propertyStatement . ?organization wdt:P31/wdt:P279* wd:Q43229 . ?organization rdfs:label ?organizationLabel . FILTER(LANG(?organizationLabel) = "en") ?property rdfs:label ?propertyLabel . FILTER(LANG(?propertyLabel) = "en") OPTIONAL { ?organization wdt:P18 ?image . } OPTIONAL { ?organization wdt:P625 ?coordinates . } OPTIONAL { ?organization p:P159 / pq:P625 ?coordinates . } }

Which organizations employed Magnus Knuth, and what are their images and geographic coordinates?

Show me the organizations where Magnus Knuth worked, along with their images and locations, and confirm the employment relationship.

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


Question: Musical works composed by Frédéric Chopin with English titles.

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 ?work ?workLabel ?image WHERE {
  ?work wdt:P86 wd:Q1268 .
  OPTIONAL {
    ?work wdt:P18 ?image .
  }
  ?work rdfs:label ?workLabel .
  FILTER ( LANG( ?workLabel ) = "en" )
}
LIMIT 100

What are the English titles of musical compositions composed by Frédéric Chopin?

List the titles of Chopin’s musical works in English, and include any available images of them.

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


Question: List all properties and values associated with Madonna, including English labels for properties and entity values.

SELECT ?item ?value ?propertyLabel ?valueLabel WHERE { VALUES ?item { wd:Q1744 } ?item ?property ?value . ?propItem wikibase:directClaim ?property . ?propItem rdfs:label ?propertyLabel . FILTER(LANG(?propertyLabel) = "en") OPTIONAL { FILTER(isIRI(?value)) ?value rdfs:label ?valueLabel . FILTER(LANG(?valueLabel) = "en") } } ORDER BY ASC(xsd:integer(STRAFTER(STR(?propItem), "P")))

What are all the known facts about Madonna (such as her birthplace, occupation, and other attributes), along with their English labels?

Show me a complete list of all direct claims about Madonna, with property names and object labels in English, sorted by property ID.

SELECT * WHERE { VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q1744> ) } BIND ( COALESCE ( ?var2Label , ?var2 ) AS ?var3Label ). ?var1 ?var4 ?var2 . ?var5 <http://wikiba.se/ontology#directClaim> ?var4 . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var5Label . FILTER ( ( ( LANG ( ?var5Label ) = "en" ) ) ) . } ORDER BY ASC( <http://www.w3.org/2001/XMLSchema#integer> ( STRAFTER ( STR ( ?var5 ) , "string1" ) ) )


Question: Musicians who died between ages 10 and 100, with their birth and death dates

SELECT ?age ?birthDate ?deathDate ?person ?birthName ?officialName WHERE { ?person wdt:P31 wd:Q5 . ?person (wdt:P106/wdt:P279*) wd:Q639669 . ?person wdt:P569 ?birthDate . ?person wdt:P570 ?deathDate . BIND( ( YEAR(?deathDate) - YEAR(?birthDate) - IF( MONTH(?deathDate) < MONTH(?birthDate) || (MONTH(?deathDate) = MONTH(?birthDate) && DAY(?deathDate) < DAY(?birthDate)), 1, 0 ) ) AS ?age ) OPTIONAL { ?person wdt:P1477 ?birthName . } OPTIONAL { ?person wdt:P1448 ?officialName . } FILTER ( ?age > 10 && ?age < 100 ) } ORDER BY ASC(?age) LIMIT 20

Which human musicians lived between 10 and 100 years, and what were their birth and death dates?

List up to 20 musicians who died between the ages of 10 and 100, including their birth names and official names if available, sorted by age.

SELECT ?var1 ?var2 ?var3 ?var4 ?var5 WHERE { BIND ( ( ( YEAR ( ?var3 ) - YEAR ( ?var2 ) ) - IF ( ( MONTH ( ?var3 ) < MONTH ( ?var2 ) ) || ( MONTH ( ?var3 ) = MONTH ( ?var2 ) ) && ( DAY ( ?var3 ) < DAY ( ?var2 ) ),"1"^^<http://www.w3.org/2001/XMLSchema#integer> ,"0"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) AS ?var1 ). ?var4 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var4 ( <http://www.wikidata.org/prop/direct/P106> / <http://www.wikidata.org/prop/direct/P279> ) <http://www.wikidata.org/entity/Q639669> . ?var4 ( <http://www.wikidata.org/prop/P569> / <http://www.wikidata.org/prop/statement/value/P569> ) ?var6 . ?var4 ( <http://www.wikidata.org/prop/P570> / <http://www.wikidata.org/prop/statement/value/P570> ) ?var7 . ?var6 <http://wikiba.se/ontology#timeValue> ?var2 . ?var7 <http://wikiba.se/ontology#timeValue> ?var3 . OPTIONAL { ?var4 <http://www.wikidata.org/prop/direct/P1477> ?var5 . } FILTER ( ( ( ?var1 > "10"^^<http://www.w3.org/2001/XMLSchema#integer> ) && ( ?var1 < "100"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . OPTIONAL { ?var4 <http://www.wikidata.org/prop/direct/P1448> ?var8 . } } ORDER BY ASC( ?var1 ) LIMIT 20


Question: How many film festivals are listed in Wikidata?

SELECT ( COUNT( DISTINCT ?filmFestival ) AS ?count ) WHERE { ?filmFestival wdt:P31 wd:Q220505 . }

What is the total number of film festivals documented in Wikidata?

Count the number of distinct film festivals in Wikidata.

SELECT( COUNT ( DISTINCT ?var1 ) AS ?var2 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q220505> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: List scholarly articles from the British Dental Journal with author names, author positions, publication dates, volumes, issues, pages, DOIs, and PubMed IDs.

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 wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?article ?articleLabel ?authorName ?authorPosition ?publicationDate ?volume ?issue ?pages ?doi ?pmid WHERE {
  ?article wdt:P1433 wd:Q4969882 ; wdt:P31 wd:Q13442814 ; wdt:P2093 ?authorName ; wdt:P577 ?publicationDate ; wdt:P478 ?volume ; wdt:P433 ?issue ; wdt:P304 ?pages ; wdt:P356 ?doi .
  OPTIONAL {
    ?article wdt:P698 ?pmid .
  }
  ?article p:P2093 ?statement .
  ?statement pq:P1545 ?authorPosition .
  ?article rdfs:label ?articleLabel .
  FILTER ( LANG( ?articleLabel ) = "en" )
}
LIMIT 100

What are the titles, authors (with order), publication details, and identifiers (DOI, PubMed) of all scholarly articles published in the British Dental Journal?

Please provide a table of all academic papers in the British Dental Journal, including each author’s name and sequence in the author list, along with their publication date, volume, issue, page range, DOI, and PubMed ID.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 ?var4 ?var5 ?var6 ?var7 ?var8 ?var9 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1433> <http://www.wikidata.org/entity/Q4969882> ; <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q13442814> ; <http://www.wikidata.org/prop/direct/P2093> ?var2 ; <http://www.wikidata.org/prop/direct/P577> ?var4 ; <http://www.wikidata.org/prop/direct/P478> ?var5 ; <http://www.wikidata.org/prop/direct/P433> ?var6 ; <http://www.wikidata.org/prop/direct/P304> ?var7 ; <http://www.wikidata.org/prop/direct/P356> ?var8 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P698> ?var9 . } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . <http://www.wikidata.org/prop/direct/P2093> <http://www.wikidata.org/prop/direct/P1545> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } LIMIT 100


Question: What are all the properties and their values for Madonna, grouped by property name?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?var1Label ( GROUP_CONCAT( DISTINCT ?var2 ; SEPARATOR = "|" ) AS ?var3 ) WHERE {
  wd:Q1744 ?var5 ?var2 .
  ?var1 wikibase:directClaim ?var5 .
  ?var1 rdfs:label ?var1Label .
  FILTER ( LANG( ?var1Label ) = "en" )
}
GROUP BY ?var1Label

For the singer Madonna, what are all the external identifiers and attributes associated with her, grouped by the type of property?

List all the properties of Madonna in Wikidata, showing each property’s English label and all its values concatenated with pipes, such as YouTube channel IDs or Freebase IDs.

SELECT ?var1Label ( GROUP_CONCAT ( DISTINCT ?var2 ; SEPARATOR = "|" ) AS ?var3 ) WHERE { ?var4 <http://www.wikidata.org/prop/direct/P646> "/m/01vs_v8". ?var1 <http://wikiba.se/ontology#directClaim> ?var5 . ?var4 ?var5 ?var2 . OPTIONAL { } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1Label


Question: Comics and anime works with at least three statements that are not films.

SELECT DISTINCT ?item (COUNT(?stmt) AS ?claimCount) WHERE { ?item (wdt:P31/wdt:P279*) wd:Q1004 . MINUS { ?item (wdt:P279*) wd:Q11424 . } ?item ?stmt ?val . } GROUP BY ?item HAVING (COUNT(?stmt) >= 3)

Which comic-related works (including anime and manga) are not films and have at least three associated statements in Wikidata?

List all comic-related works, including anime and manga, that are not classified as films and have a substantial number of claims (at least three).

SELECT DISTINCT ?var1 ?var2 WHERE { { ?var1 ( <http://www.wikidata.org/prop/P31> / <http://www.wikidata.org/prop/statement/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q1004> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P361> <http://www.wikidata.org/entity/Q10901350> . FILTER ( ( ?var3 IN ( <http://www.wikidata.org/entity/Q1107> , <http://www.wikidata.org/entity/Q8274> ) ) ) . } MINUS { ?var1 ( <http://www.wikidata.org/prop/P31> / <http://www.wikidata.org/prop/statement/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q11424> . } ?var1 <http://wikiba.se/ontology#identifiers> ?var2 . FILTER ( ( ( ?var4 >= "3"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . }


Question: List all botanical divisions and their parent taxa in Wikidata formatted as "Cash['Qxxxstring1" and "string2Qyyy' }".

SELECT DISTINCT (CONCAT("Cash['", STRAFTER(STR(?division), "/entity/"), "string1") AS ?formattedDivision) (CONCAT("string2", STRAFTER(STR(?parentTaxon), "/entity/"), "' }") AS ?formattedParent) WHERE { ?division wdt:P105 wd:Q334460 . ?division wdt:P171 ?parentTaxon . }

What are the Q-IDs of all taxonomic divisions (rank: division) and their immediate parent taxa in Wikidata, formatted as strings in the pattern "Cash['Qxxxstring1" and "string2Qyyy' }"?

Can you generate a list of division-level plant taxa and their parent taxa from Wikidata, formatted as strings for use in code, where each division is formatted as "Cash['Qxxxstring1" and each parent as "string2Qyyy' }"?

SELECT DISTINCT( CONCAT ( "Cash['", STRAFTER ( STR ( ?var1 ) , "/entity/" ) , "string1" ) AS ?var2 )( CONCAT ( "string2", STRAFTER ( STR ( ?var3 ) , "/entity/" ) , "' }" ) AS ?var4 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P105> <http://www.wikidata.org/entity/Q334460> . ?var1 <http://www.wikidata.org/prop/direct/P171> ?var3 . }


Question: What is the Wikidata item for the IMDb ID tt1429551?

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

Which movie on Wikidata has the IMDb identifier tt1429551, and what is its English name?

Find the English label of the Wikidata item that corresponds to the IMDb ID tt1429551.

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


Question: What is Green Day's image, genres, and Facebook username?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?image ?genre ?facebookUsername WHERE {
  wd:Q47871 wdt:P18 ?image .
  wd:Q47871 wdt:P136 ?genre .
  wd:Q47871 wdt:P2013 ?facebookUsername .
}

Green Day image, music genres, and Facebook profile

Show me the official image, genres, and Facebook username of the band Green Day.

SELECT ?var1 ?var2 ?var3 WHERE { ?var4 <http://www.w3.org/2000/01/rdf-schema#label> "Green Day". ?var4 <http://www.wikidata.org/prop/direct/P18> ?var1 . ?var4 <http://www.wikidata.org/prop/direct/P136> ?var2 . ?var4 <http://www.wikidata.org/prop/direct/P2013> ?var3 . }


Question: What editions or translations of works published after 1500 are available on Italian Wikisource?

PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?work WHERE {
  ?work wdt:P31 wd:Q3331189 ; wdt:P577 ?date .
  ?page schema:about ?work ; schema:isPartOf <https://it.wikisource.org/> .
  BIND( YEAR( ?date ) AS ?year ) .
  FILTER ( ?year >= 1500 )
}

Show me works on Italian Wikisource that were first published in or after the year 1500.

Which texts digitized on Italian Wikisource have a publication date from 1500 or later?

SELECT ?var1 WHERE { BIND ( YEAR ( ?var2 ) AS ?var3 ). ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3331189> ; <http://www.wikidata.org/prop/direct/P577> ?var2 . ?var4 <http://schema.org/about> ?var1 . ?var4 <http://schema.org/isPartOf> <https://it.wikisource.org/> . FILTER ( ( ( ?var3 >= "1500"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . }


Question: How many valid species are there in Wikidata, excluding homotypic synonyms?

SELECT (COUNT(?species) AS ?count) WHERE { ?species wdt:P105 wd:Q7432 . FILTER NOT EXISTS { ?species (wdt:P31/wdt:P279*) wd:Q42310380 . } }

What is the count of taxonomic species that are not classified as nomenclatural synonyms?

Can you tell me how many species in Wikidata are considered valid biological taxa and not just synonyms?

SELECT( COUNT ( ?var1 ) AS ?var2 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P105> <http://www.wikidata.org/entity/Q7432> . FILTER ( ( NOT EXISTS { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q42310380> . } ) ) . }


Question: What Wikidata item has the IMDb ID tt0036008?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?movie WHERE {
  ?movie wdt:P345 "tt0036008" .
}

Which movie is identified by the IMDb identifier tt0036008?

Find the Wikidata entry for the film with IMDb ID tt0036008.

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


Question: What are some creative works created by novelists, and what qualifiers are associated with those creator relationships?

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?work ?person ( SAMPLE( ?qualifierProp ) AS ?qualifier ) WHERE {
  ?work p:P170 ?stmt .
  ?stmt ps:P170 ?person .
  ?person wdt:P106 wd:Q6625963 .
  OPTIONAL {
    ?stmt ?qualifierProp ?qualifierValue .
    ?qualifierProp wikibase:qualifierProperty wdt:P170 .
  }
}
GROUP BY ?work ?person

Show me works and their creators where the creator is a novelist, along with any additional details (qualifiers) on the creator statement.

Which books or fictional characters were created by novelists, and what metadata (qualifiers) are attached to those creator links in Wikidata?

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


Question: Which Wikidata items have the Twitter/X usernames "envlh" or "IMDb"?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?username WHERE {
  ?item wdt:P2002 ?username .
  VALUES ?username {
    "envlh" "IMDb"
  }
}

Who or what has the Twitter handle "envlh" or "IMDb" on Wikidata?

Show me the entities on Wikidata that are associated with the Twitter usernames "envlh" and "IMDb".

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "envlh" ) ( "string1" ) ( "outlawvern" ) ( "IMDb" ) ( "string2" ) ( "string3" ) ( "string4" ) } }


Question: Who are the members of The Beatles?

SELECT ?member WHERE { ?member wdt:P463 wd:Q1299. }

Which individuals are part of the musical group The Beatles?

List all people who have been members of The Beatles.

SELECT ?var1 WHERE { <http://www.wikidata.org/entity/Q26690202> <http://www.wikidata.org/prop/direct/P463> <http://www.wikidata.org/entity/Q856831> . }


Question: What is the English label of Hatooka, and what is its Japanese Wikipedia page?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?var1Label ?var2 WHERE {
  ?var2 schema:about wd:Q17219334 .
  ?var2 schema:inLanguage "ja" .
  FILTER ( STRSTARTS( STR( ?var2 ) , "https://ja.wikipedia.org/" ) ) .
  wd:Q17219334 rdfs:label ?var1Label .
  FILTER ( LANG( ?var1Label ) = "en" )
}

Show me the Japanese Wikipedia article about the neighborhood Hatooka in Japan, along with its English name.

Find the English name of Hatooka and link to its Japanese Wikipedia page.

SELECT DISTINCT ?var1Label ?var2 WHERE { ?var2 <http://schema.org/about> <http://www.wikidata.org/entity/Q17219334> . ?var2 <http://schema.org/about> ?var1 . ?var2 <http://schema.org/inLanguage> "ja". FILTER ( ( ( SUBSTR ( STR ( ?var2 ) ,"1"^^<http://www.w3.org/2001/XMLSchema#integer> ,"25"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string1" ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "ja,en". } }


Question: What are the manga series that are also categorized as manga, and what are their titles?

SELECT DISTINCT ?var1 ?label WHERE { ?var1 wdt:P31 wd:Q8274 ; wdt:P31 wd:Q21198342 ; rdfs:label ?label . } ORDER BY ASC(?label) LIMIT 100

List the titles of manga series that are directly marked as instances of both manga and manga series.

Show me the names of all manga series that have both 'manga' and 'manga series' as their types.

SELECT DISTINCT ?var1 ?var1Label WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr,en". } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q8274> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q21198342> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . } ORDER BY ASC( ?var1Label ) LIMIT 100


Question: What is the common administrative category shared by NASA and the China National Space Administration?

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:Q23548 wdt:P31 ?type1 .
  wd:Q320644 wdt:P31 ?type2 .
  ?type1 wdt:P279 * wd:Q327333 .
  ?type2 wdt:P279 * wd:Q327333 .
  wd:Q327333 rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}

What is the most specific type that both NASA and China's space agency belong to?

What do NASA and the China National Space Administration have in common in terms of organizational classification?

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/Q96> ; <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/Q320644> ; <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 Associated Press and Ramallah 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 ?commonAncestor ?label WHERE {
  wd:Q40469 wdt:P31 ?type1 .
  wd:Q158119 wdt:P31 ?type2 .
  ?type1 wdt:P279 * ?commonAncestor .
  ?type2 wdt:P279 * ?commonAncestor .
  ?commonAncestor rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}
ORDER BY ?label
LIMIT 1

What do Associated Press and Ramallah have in common in terms of their classification in Wikidata?

What is the highest-level shared class that includes both a news agency and a city?

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


Question: Record labels and their parent organizations

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 ?recordLabel ?recordLabelLabel ?parent ?parentLabel WHERE {
  ?recordLabel wdt:P31 wd:Q18127 .
  ?recordLabel wdt:P749 ?parent .
  OPTIONAL {
    ?recordLabel rdfs:label ?recordLabelLabel
    FILTER(LANG(?recordLabelLabel) = "en")
  }
  OPTIONAL {
    ?parent rdfs:label ?parentLabel
    FILTER(LANG(?parentLabel) = "en")
  }
}
LIMIT 10

Which record labels have parent companies, and what are those companies?

List record labels along with their parent organizations, including their English labels.

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


Question: People with China Biographical Database IDs and their IDs

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?person ?cbdbId WHERE {
  ?person wdt:P497 ?cbdbId .
}
LIMIT 10

Who are some historical Chinese figures listed in the China Biographical Database, and what are their CBDB IDs?

List 10 people from Wikidata who have a China Biographical Database ID along with their IDs.

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P497> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "zh". ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . } FILTER ( ( STRSTARTS ( ?var4 , "Q" ) ) ) . } LIMIT 10


Question: What movie has the IMDb ID tt1919017?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item WHERE {
  ?item wdt:P345 "tt1919017" .
}
LIMIT 1

Which Wikidata item corresponds to the IMDb identifier tt1919017?

Find the Wikidata entry for the film with IMDb ID tt1919017.

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


Question: What properties are used for the music genre Gumbe, and what are their values and counts?

SELECT ?property ?propertyLabel (COUNT(?value) AS ?valueCount) (GROUP_CONCAT(?valueLabel; SEPARATOR=", ") AS ?valueLabels) WHERE { wd:Q5618068 ?property ?value . ?value rdfs:label ?valueLabel . FILTER(LANG(?valueLabel) = "en") . ?propertyItem wikibase:directClaim ?property . ?propertyItem rdfs:label ?propertyLabel . FILTER(LANG(?propertyLabel) = "en") . } GROUP BY ?property ?propertyLabel

For the music genre Gumbe, what are the English labels of its properties, how many values does each have, and what are those values?

List all properties of the music genre Gumbe in English, along with the count of their values and the concatenated labels of those values.

SELECT ?var1 ( SAMPLE ( ?var2 ) AS ?var2 )( COUNT ( ?var3 ) AS ?var4 )( GROUP_CONCAT ( ?var5 ; SEPARATOR = ", " ) AS ?var5 ) WHERE { <http://www.wikidata.org/entity/Q5618068> ?var1 ?var3 . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var5 . FILTER ( ( ( LANG ( ?var5 ) = "en" ) ) ) . ?var6 <http://wikiba.se/ontology#directClaim> ?var1 . ?var6 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . } GROUP BY ?var1


Question: Cities in Japan with population and area data

SELECT ?city ?cityLabel ?population ?area WHERE { ?city wdt:P31 wd:Q515 . ?city wdt:P17 wd:Q17 . ?city wdt:P1082 ?population . ?city wdt:P2046 ?area . ?city rdfs:label ?cityLabel . FILTER(LANG(?cityLabel) = "en") } LIMIT 10

What are the cities in Japan and their populations and areas?

List Japanese cities along with their population and area measurements.

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


Question: Musical works composed by Mozart and their publication dates

SELECT DISTINCT ?work ?workLabel ?publicationDate WHERE { ?work wdt:P86 wd:Q254 ; wdt:P577 ?publicationDate . ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel) = "en") }

What are the titles and publication dates of musical works composed by Wolfgang Amadeus Mozart?

List the English titles and release dates of all compositions by Mozart.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P86> <http://www.wikidata.org/entity/Q254> ; <http://www.wikidata.org/prop/direct/P528> ?var4 ; <http://www.wikidata.org/prop/direct/P577> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr". } }


Question: What are the cities and wards in Japan, along with their population and area?

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 ?place ?countryLabel ?placeLabel ?population ?area ?sourceUrl WHERE {
  {
    ?place wdt:P31 / wdt:P279 * wd:Q137773 .
  } UNION {
    ?place wdt:P31 / wdt:P279 * wd:Q494721 .
  } UNION {
    ?place wdt:P31 wd:Q5327704 .
  }
  OPTIONAL {
    ?place wdt:P17 ?country .
  }
  OPTIONAL {
    ?place wdt:P1082 ?population .
  }
  OPTIONAL {
    ?place wdt:P2046 ?area .
  }
  OPTIONAL {
    ?place wdt:P1896 ?sourceUrl .
  }
  ?place rdfs:label ?placeLabel .
  FILTER(LANG(?placeLabel) = "en")
  OPTIONAL {
    ?country rdfs:label ?countryLabel .
    FILTER(LANG(?countryLabel) = "en")
  }
}

Can you list all administrative divisions in Japan such as wards and cities, including their population, area, and country?

Which Japanese municipalities (including special wards and cities) have recorded population and area data?

SELECT ?var1 ?var2Label ?var1Label ?var3 ?var4 ?var5 WHERE { { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q137773> . } UNION { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q494721> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5327704> . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P17> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P2046> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1082> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1896> ?var5 . } OPTIONAL { ?var5 <http://schema.org/about> ?var1 . ?var5 <http://schema.org/inLanguage> "ja". FILTER ( ( ( SUBSTR ( STR ( ?var5 ) ,"1"^^<http://www.w3.org/2001/XMLSchema#integer> ,"25"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string1" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "ja". } }


Question: Hungarian labels for subclasses of drama

SELECT ?subclass ?label WHERE { ?subclass wdt:P279 wd:Q25372 . OPTIONAL { ?subclass rdfs:label ?label . FILTER (LANG(?label) = "hu") } }

What are the Hungarian-language names for different types of drama?

Show me all subclasses of drama along with their Hungarian labels, if available.

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


Question: How many items are marked as duplicates of malaria in Wikidata?

SELECT (COUNT(?duplicateItem) AS ?count) WHERE { ?duplicateItem wdt:P2959 wd:Q12156 .}

Is there any item in Wikidata that is a duplicate of the disease malaria?

Count the number of items in Wikidata that have been flagged as duplicates of the malaria entry (Q12156).

SELECT( COUNT ( ?var1 ) AS ?var2 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2959> <http://www.wikidata.org/entity/Q12156> . }


Question: Scientific names of taxa without publication year and their authors

SELECT ?authorLabel ?scientificName WHERE { ?taxon p:P225 ?statement . ?statement ps:P225 ?scientificName . ?statement pq:P405 ?author . FILTER (NOT EXISTS { ?statement pq:P574 ?year }) . ?author rdfs:label ?authorLabel . FILTER(LANG(?authorLabel) = "en") } LIMIT 100

Which scientific names of taxa have been described by authors but without a recorded publication year?

List the authors and scientific names of taxon names that lack a publication date.

SELECT ?var1 ?var2Label WHERE { ?var3 <http://www.wikidata.org/prop/P225> ?var2 . ?var2 <http://www.wikidata.org/prop/qualifier/P405> ?var1 . FILTER ( ( NOT EXISTS { ?var2 <http://www.wikidata.org/prop/qualifier/P574> ?var4 . } ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "da,en". } } LIMIT 100


Question: What is the most specific common superclass of the type of Joe Maddon and the type of the International Space Station?

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

Find the shared ancestor class in the Wikidata hierarchy between human and space station.

Which class is the closest common parent in the taxonomy for Joe Maddon and the International Space Station?

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/Q1093629> ; <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/Q25271> ; <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 Wikidata item for the movie with IMDb ID tt0155151?

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

Which film on Wikidata has the IMDb identifier tt0155151?

Find the Wikidata entry for the movie identified by tt0155151 on IMDb.

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


Question: What is the most specific category that both Dallas and Croydon University Hospital belong to?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonAncestor ?label WHERE {
  wd:Q515 wdt:P279 * ?commonAncestor .
  wd:Q16917 wdt:P279 * ?commonAncestor .
  ?commonAncestor rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}
ORDER BY DESC ( STRLEN( ?label ) )
LIMIT 1

What is the highest-level common class that includes both a city like Dallas and a hospital like Croydon University Hospital?

Find the most specific shared superclass in Wikidata between the type of Dallas and the type of Croydon University Hospital.

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


Question: Deprecated scientific names of biological taxa

PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
SELECT ?taxonName WHERE {
  ?taxon p:P225 ?statement .
  ?statement ps:P225 ?taxonName .
  ?statement wikibase:rank wikibase:DeprecatedRank .
}

What are the outdated scientific names for species that are no longer accepted?

List all the deprecated taxon names used in Wikidata.

SELECT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/P225> ?var1 . ?var1 <http://wikiba.se/ontology#rank> <http://wikiba.se/ontology#DeprecatedRank> . }


Question: What are Brad Pitt’s birth name and date of birth, and those of his spouses?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?birthName ?birthDate ?spouseBirthName ?spouseBirthDate WHERE {
  wd:Q35332 wdt:P1477 ?birthName ; wdt:P569 ?birthDate ; wdt:P26 ?spouse .
  ?spouse wdt:P1477 ?spouseBirthName ; wdt:P569 ?spouseBirthDate .
}

Can you tell me the birth names and birth dates of Brad Pitt and all his spouses?

Who are Brad Pitt’s spouses, and what are their full birth names and dates of birth?

CONSTRUCT { ?var1 <http://www.wikidata.org/prop/direct/P1477> ?var2 ; <http://dbpedia.org/ontology/birthDate> ?var3 ; <http://www.wikidata.org/prop/direct/P26> [ <http://www.wikidata.org/prop/direct/P1477> ?var4 ; <http://www.wikidata.org/prop/direct/P569> ?var5 ] } WHERE { VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q35332> ) } BIND ( STR ( ?var6 ) AS ?var2 ). BIND ( STR ( ?var7 ) AS ?var3 ). BIND ( STR ( ?var8 ) AS ?var4 ). BIND ( STR ( ?var9 ) AS ?var5 ). ?var1 <http://www.wikidata.org/prop/direct/P1477> ?var6 ; <http://www.wikidata.org/prop/direct/P569> ?var7 ; <http://www.wikidata.org/prop/direct/P26> [ <http://www.wikidata.org/prop/direct/P1477> ?var8 ; <http://www.wikidata.org/prop/direct/P569> ?var9 ] . }


Question: Is the profession of composer a subclass of human?

ASK WHERE { wd:Q36834 ( wdt:P279* ) wd:Q5 . }

Are composers (as a category) considered humans in Wikidata?

Confirm whether the class of composers is a subclass of human beings.

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


Question: What is the English name of Ubiquity Press?

SELECT ?label WHERE { wd:Q7876554 rdfs:label ?label . FILTER (LANGMATCHES(LANG(?label), "en")) }

Can you tell me the official English label for the publisher Ubiquity Press?

What is Ubiquity Press called in English?

SELECT DISTINCT * WHERE { <http://www.wikidata.org/entity/Q7876554> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( LANGMATCHES ( LANG ( ?var1Label ) , "EN" ) ) ) . } LIMIT 1


Question: Which institution has the Twitter handle UM_IDS?

SELECT ?item ?username WHERE { ?item wdt:P2002 ?username . VALUES ?username { "UM_IDS" } }

What is the Wikidata item for the Twitter username UM_IDS?

Find the entity in Wikidata associated with the Twitter username UM_IDS.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "vyruss" ) ( "elli_lib" ) ( "string1" ) ( "taswegian" ) ( "string2" ) ( "McDapper" ) ( "UM_IDS" ) ( "string3" ) ( "Iain" ) ( "Raly_N" ) ( "lcrdm" ) ( "ragamouf" ) ( "string4" ) ( "string5" ) ( "SN_OAbooks" ) ( "string6" ) } }


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

SELECT ?movie ?wikipedia_page WHERE { ?movie wdt:P345 "tt10676048" . ?wikipedia_page schema:about ?movie . { ?wikipedia_page schema:inLanguage "en" . } UNION { ?wikipedia_page schema:inLanguage "de" . } }

What are the English and German Wikipedia pages about the movie "The Marvels"?

Show me the Wikipedia articles in English and German about the film with IMDb ID tt10676048.

SELECT ?var1 ?var2 ?var3 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt2144642". } ?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: List of 19th-century composers with English labels

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?composer ?composerLabel WHERE {
  ?composer wdt:P106 wd:Q36834 ; wdt:P569 ?birthDate .
  FILTER(YEAR(?birthDate) >= 1801 && YEAR(?birthDate) <= 1900)
  .
  ?composer skos:prefLabel ?composerLabel .
  FILTER(LANG(?composerLabel) = "en")
}

Who are the composers born between 1801 and 1900?

Show me the names of all composers from the 19th century.

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


Question: Composers with birthplace coordinates and images

SELECT ?composer ?composerLabel ?coordinates ?image WHERE { ?composer wdt:P106 wd:Q36834 . ?composer wdt:P19/wdt:P625 ?coordinates . ?composer wdt:P18 ?image . ?composer rdfs:label ?composerLabel . FILTER(LANG(?composerLabel) = "en") }

Who are the composers whose birthplace has geographic coordinates and who have an image on Wikimedia Commons?

Show me the names, birthplace coordinates, and images of all composers on Wikidata, with labels in English.

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


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

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?movie ?wiki_page WHERE {
  ?movie wdt:P345 "tt0086946" .
  ?wiki_page schema:about ?movie ; schema:inLanguage ?lang .
  FILTER(?lang = "en" || ?lang = "de")
}

What are the English and German Wikipedia articles for the film "Beat Street" (IMDb: tt0086946)?

Show me the English and German Wikipedia links for the movie identified by IMDb ID tt0086946.

SELECT ?var1 ?var2 ?var3 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt0086946". } ?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: List publishers and their ISFDB IDs.

SELECT ?publisher ?publisherLabel ?isfdbId WHERE { ?publisher wdt:P1239 ?isfdbId . ?publisher rdfs:label ?publisherLabel . FILTER(LANG(?publisherLabel) = "en") } LIMIT 1000

Which publishers have an ISFDB identifier, and what are their names in English?

Show me the English names of publishers along with their corresponding ISFDB publisher IDs.

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


Question: What organization is P. Vincent Jenkins affiliated with or employed by, when did he start, and is there an image of the organization?

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?image ?organization ?organizationLabel ?start ?end ?degreeLabel WHERE {
  wd:Q42767460(p:P1416 | p:P108) ?statement .
  ?statement ps:P1416 | ps:P108 ?organization .
  ?organization rdfs:label ?organizationLabel .
  FILTER(LANG(?organizationLabel) = "en")
  OPTIONAL {
    ?organization wdt:P18 ?image
  }
  OPTIONAL {
    ?statement pq:P580 ?start
  }
  OPTIONAL {
    ?statement pq:P582 ?end
  }
  OPTIONAL {
    ?statement pq:P512 ?degree .
    ?degree rdfs:label ?degreeLabel .
    FILTER(LANG(?degreeLabel) = "en")
  }
}

Which organization did P. Vincent Jenkins work for or affiliate with starting on December 8, 2015, and what does it look like?

Show me the image, name, and start date of the organization associated with researcher P. Vincent Jenkins, along with any academic degrees he holds.

SELECT ?var1 ?var2 ?var3Label ?var4 ?var5 ?var6Label WHERE { { <http://www.wikidata.org/entity/Q42767460> <http://www.wikidata.org/prop/P1416> ?var7 . } UNION { <http://www.wikidata.org/entity/Q42767460> <http://www.wikidata.org/prop/P108> ?var7 . } { ?var7 <http://www.wikidata.org/prop/statement/P1416> ?var2 . } UNION { ?var7 <http://www.wikidata.org/prop/statement/P108> ?var2 . } ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P580> ?var4 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P582> ?var5 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P512> ?var8 . ?var8 <http://www.w3.org/2000/01/rdf-schema#label> ?var6Label . FILTER ( ( ( LANG ( ?var6Label ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: Does the National University “Yaroslav the Wise Law Academy of Ukraine” have a Twitter/X account with username nlu_edu_ua?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
ASK WHERE {
  ?university wdt:P2002 "nlu_edu_ua" .
}

Is there a Wikidata item for an organization that uses the Twitter username "nlu_edu_ua"?

Confirm if the Twitter handle "nlu_edu_ua" is linked to any entity in Wikidata.

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


Question: What is the most specific common occupation category shared by Oscar Wendt and Bruce Arians?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonClass WHERE {
  wd:Q521088 wdt:P106 ?occ1 .
  wd:Q4046340 wdt:P106 ?occ2 .
  ?occ1 wdt:P279 * ?commonClass .
  ?occ2 wdt:P279 * ?commonClass .
  FILTER ( ?commonClass = wd:Q2066131 )
}

What category do both Oscar Wendt (soccer player) and Bruce Arians (American football coach) belong to at the highest level of specificity?

What is the lowest-level class in the Wikidata hierarchy that includes both an association football player and an American football player?

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/Q521088> ; <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/Q4046340> ; <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 organizations is Jeppe Nørregaard affiliated with or employed by, and what are their images and affiliation dates?

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?image ?organization ?organizationLabel ?startDate ?endDate ?degreeLabel WHERE {
  {
    wd:Q44738835 p:P1416 ?statement .
    ?statement ps:P1416 ?organization .
  } UNION {
    wd:Q44738835 p:P108 ?statement .
    ?statement ps:P108 ?organization .
  }
  ?organization rdfs:label ?organizationLabel .
  FILTER(LANG(?organizationLabel) = "en")
  OPTIONAL {
    ?organization wdt:P18 ?image .
  }
  OPTIONAL {
    ?statement pq:P580 ?startDate .
  }
  OPTIONAL {
    ?statement pq:P582 ?endDate .
  }
  OPTIONAL {
    ?statement pq:P512 ?degree .
    ?degree rdfs:label ?degreeLabel .
    FILTER(LANG(?degreeLabel) = "en")
  }
}

Show me the English names, images, and employment periods of organizations linked to Jeppe Nørregaard, along with any academic degrees associated with those links.

Which institutions has Jeppe Nørregaard been connected to, and do they have official images or recorded start/end dates?

SELECT ?var1 ?var2 ?var3Label ?var4 ?var5 ?var6Label WHERE { { <http://www.wikidata.org/entity/Q44738835> <http://www.wikidata.org/prop/P1416> ?var7 . } UNION { <http://www.wikidata.org/entity/Q44738835> <http://www.wikidata.org/prop/P108> ?var7 . } { ?var7 <http://www.wikidata.org/prop/statement/P1416> ?var2 . } UNION { ?var7 <http://www.wikidata.org/prop/statement/P108> ?var2 . } ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P580> ?var4 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P582> ?var5 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P512> ?var8 . ?var8 <http://www.w3.org/2000/01/rdf-schema#label> ?var6Label . FILTER ( ( ( LANG ( ?var6Label ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: Female singers by country of citizenship

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?singer WHERE {
  ?singer wdt:P31 wd:Q5 .
  ?singer wdt:P27 ?country .
  ?singer wdt:P106 wd:Q177220 .
  ?singer wdt:P21 wd:Q6581072 .
}
ORDER BY ASC ( ?country )

Who are all the female singers in Wikidata, sorted by their country of citizenship?

List all human female singers and order them by their country of citizenship, showing only their Wikidata IDs.

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var1 <http://www.wikidata.org/prop/direct/P27> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q177220> . ?var1 <http://www.wikidata.org/prop/direct/P21> <http://www.wikidata.org/entity/Q6581072> . } ORDER BY ASC( ?var2 )


Question: What is the most specific category that both a human and an airline belong to in the Wikidata hierarchy?

SELECT ?ancestor (COUNT(?mid1) + COUNT(?mid2) AS ?totalDistance) ?label WHERE {
  wd:Q5 wdt:P279+ ?mid1 .
  ?mid1 wdt:P279* ?ancestor .
  wd:Q46970 wdt:P279+ ?mid2 .
  ?mid2 wdt:P279* ?ancestor .
  ?ancestor rdfs:label ?label .
  FILTER(LANG(?label) = 'en')
}
GROUP BY ?ancestor ?label
ORDER BY ASC(?totalDistance)
LIMIT 1

Which entity is the closest common ancestor in the subclass tree between Aroldis Chapman's type (human) and All Nippon Airways' type (airline)?

Find the shared subclass with the shortest combined path length from human and airline 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/Q204284> ; <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 is the most specific category that both Beijing and the Taliban belong to in the Wikidata taxonomy?

SELECT ?commonClass (?distBeijing + ?distTaliban AS ?totalDistance)
WHERE {
  wd:Q956 wdt:P31 ?typeBeijing .
  ?typeBeijing wdt:P279* ?commonClass .
  wd:Q42418 wdt:P31 ?typeTaliban .
  ?typeTaliban wdt:P279* ?commonClass .
  {
    SELECT ?typeBeijing ?commonClass (COUNT(?mid1) AS ?distBeijing)
    WHERE {
      wd:Q956 wdt:P31 ?typeBeijing .
      ?typeBeijing wdt:P279+ ?mid1 .
      ?mid1 wdt:P279* ?commonClass .
    }
    GROUP BY ?typeBeijing ?commonClass
  }
  {
    SELECT ?typeTaliban ?commonClass (COUNT(?mid2) AS ?distTaliban)
    WHERE {
      wd:Q42418 wdt:P31 ?typeTaliban .
      ?typeTaliban wdt:P279+ ?mid2 .
      ?mid2 wdt:P279* ?commonClass .
    }
    GROUP BY ?typeTaliban ?commonClass
  }
  FILTER(?commonClass = ?commonClass)
}
ORDER BY ASC(?totalDistance)
LIMIT 1

Which class is the lowest common ancestor of Beijing and the Taliban when considering their types and their superclasses?

Find the shared superclass with the shortest combined path from both Beijing and the Taliban in the Wikidata 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/Q956> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q42418> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: What are the English and German Wikipedia and Wikiquote pages about the movie with IMDb ID tt0765476?

SELECT ?movie ?page WHERE { ?movie wdt:P345 "tt0765476" . ?page schema:about ?movie . { ?page schema:inLanguage "en" . } UNION { ?page schema:inLanguage "de" . } }

Can you show me the language-specific pages (in English or German) linked to the movie Meet Dave on IMDb?

Which language versions of Wikipedia and Wikiquote have articles about the film identified by tt0765476?

SELECT ?var1 ?var2 ?var3 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt0765476". } ?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 institutions is Audrey Thorstad affiliated with or employed by, along with their images, start dates, and academic degrees?

SELECT ?image ?institution ?institutionLabel ?start ?end ?degreeLabel WHERE {
  {
    wd:Q49662868 p:P1416 ?statement .
    ?statement ps:P1416 ?institution .
  } UNION {
    wd:Q49662868 p:P108 ?statement .
    ?statement ps:P108 ?institution .
  }

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

  OPTIONAL {
    ?institution wdt:P18 ?image .
  }

  OPTIONAL {
    ?statement pq:P580 ?start .
  }

  OPTIONAL {
    ?statement pq:P582 ?end .
  }

  OPTIONAL {
    ?statement pq:P512 ?degree .
    ?degree rdfs:label ?degreeLabel .
    FILTER (LANG(?degreeLabel) = "en")
  }
}

Which universities has Audrey Thorstad been associated with, what are their images, when did she start working there, and did she earn any degrees through those affiliations?

Show me the institutions Audrey Thorstad has worked for or been affiliated with, including their images, employment start dates, and any academic degrees linked to those affiliations.

SELECT ?var1 ?var2 ?var3Label ?var4 ?var5 ?var6Label WHERE { { <http://www.wikidata.org/entity/Q49662868> <http://www.wikidata.org/prop/P1416> ?var7 . } UNION { <http://www.wikidata.org/entity/Q49662868> <http://www.wikidata.org/prop/P108> ?var7 . } { ?var7 <http://www.wikidata.org/prop/statement/P1416> ?var2 . } UNION { ?var7 <http://www.wikidata.org/prop/statement/P108> ?var2 . } ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P580> ?var4 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P582> ?var5 . } OPTIONAL { ?var7 <http://www.wikidata.org/prop/qualifier/P512> ?var8 . ?var8 <http://www.w3.org/2000/01/rdf-schema#label> ?var6Label . FILTER ( ( ( LANG ( ?var6Label ) = "en" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } }


Question: How many diseases are genetically associated with the MSRA gene?

SELECT (COUNT(?disease) AS ?count) WHERE { ?disease wdt:P2293 wd:Q18029451 . }

What is the number of diseases linked to the MSRA gene through genetic association?

List the count of diseases that have a genetic association with the MSRA gene.

SELECT( COUNT ( ?var1 ) AS ?var2 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2293> <http://www.wikidata.org/entity/Q18029451> . }


Question: What is the WikiPathways ID for the pathway found in humans that corresponds to WP3303?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?wikipathwaysId WHERE {
  ?item wdt:P2410 ?wikipathwaysId ; wdt:P703 wd:Q15978631 .
  FILTER(?wikipathwaysId = "WP3303")
}

Which WikiPathways identifier is associated with a biological pathway in Homo sapiens?

Can you tell me the WikiPathways ID of the pathway linked to humans with the identifier WP3303?

SELECT ?var1 WHERE { <http://identifiers.org/wikipathways/WP3303_r87628> <http://www.wikidata.org/prop/direct/P2410> ?var1 ; <http://www.wikidata.org/prop/direct/P703> <http://www.wikidata.org/entity/Q15978631> . }


Question: Rock bands with images on Wikimedia Commons

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 ?rockBandLabel ?image WHERE {
  ?rockBand wdt:P31 wd:Q5741069 .
  ?rockBand wdt:P18 ?image .
  ?rockBand rdfs:label ?rockBandLabel .
  FILTER(LANG(?rockBandLabel) = "en")
}

What are the names of rock bands and their associated images on Wikimedia Commons?

Show me the English names of rock bands and their official images from Wikimedia Commons.

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


Question: Japanese-labeled drama television series on Wikidata.

SELECT DISTINCT ?item ?label WHERE { ?item wdt:P31 wd:Q1366112 . ?item rdfs:label ?label . FILTER(LANG(?label) = "ja") } LIMIT 100

What are the Japanese-language titles of drama television series listed on Wikidata?

Show me the names of drama TV series that have Japanese labels.

SELECT DISTINCT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1366112> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . FILTER ( ( ( LANG ( ?var2 ) = "ja" ) ) ) . } LIMIT 100


Question: Artworks depicting a musician

SELECT ?artwork ?artworkLabel WHERE { ?statement ps:P180 wd:Q639669 . ?artwork p:P180 ?statement . OPTIONAL { ?artwork rdfs:label ?artworkLabel . FILTER(LANG(?artworkLabel) = "en") } OPTIONAL { ?artwork wdt:P1476 ?artworkLabel . FILTER(LANG(?artworkLabel) = "en") } } LIMIT 101

List up to 101 artworks that feature a musician as the subject, along with their English titles.

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


Question: Japanese TV series with IMDb, Netflix, and Freebase IDs, along with their English titles and Wikipedia links.

SELECT ?series ?wikipediaPage ?label ?image ?imdbId ?allmovieId ?freebaseId ?netflixId ?moviemeterId WHERE { ?series wdt:P31/wdt:P279* wd:Q21191019 . ?series wdt:P495 wd:Q17 . ?wikipediaPage schema:about ?series . OPTIONAL { ?series wdt:P18 ?image . } OPTIONAL { ?series wdt:P345 ?imdbId . } OPTIONAL { ?series wdt:P1562 ?allmovieId . } OPTIONAL { ?series wdt:P646 ?freebaseId . } OPTIONAL { ?series wdt:P1874 ?netflixId . } OPTIONAL { ?series wdt:P1970 ?moviemeterId . } ?series rdfs:label ?label . FILTER(LANG(?label) = "en") }

What are the English titles, Wikipedia pages, and external IDs (like IMDb and Netflix) for Japanese television series?

List all Japanese television series with their English labels, associated Wikipedia pages, and optional identifiers such as IMDb, Netflix, and MovieMeter IDs.

SELECT ?var1 ?var2 ?var1Label ?var3 ?var4 ?var5 ?var6 ?var7 ?var8 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q21191019> . ?var1 <http://www.wikidata.org/prop/direct/P495> <http://www.wikidata.org/entity/Q17> . ?var2 <http://schema.org/about> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "ja". } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P345> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1562> ?var5 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P646> ?var6 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1874> ?var7 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1970> ?var8 . } }


Question: What class do Formula One and Broadcom have in common?

SELECT ?commonClass WHERE { wd:Q1968 wdt:P31 ?commonClass . wd:Q555925 wdt:P31 ?commonClass . }

Which organization category includes both Formula One and Broadcom?

Are Formula One and Broadcom both types of the same broader category? If so, what is it?

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/Q1968> ; <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/Q555925> ; <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 of Tolkien elves who are Sindar or Moriquendi.

SELECT DISTINCT ?elf ?elfLabel WHERE { { ?elf wdt:P172 wd:Q1647099 . } UNION { ?elf wdt:P172 wd:Q7503864 . } OPTIONAL { ?elf rdfs:label ?elfLabel . FILTER(LANG(?elfLabel) = "en") } }

Which fictional elves from J.R.R. Tolkien’s legendarium belong to the Sindar or Moriquendi ethnic groups?

Show me the names of individual Tolkien characters who are ethnically Sindar or Moriquendi, along with their English labels.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { { ?var1 ( <http://www.wikidata.org/prop/direct/P172> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q1647099> . } UNION { ?var1 ( <http://www.wikidata.org/prop/direct/P172> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q7503864> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,de,ru,fr,es,it,ja,zh". } }


Question: What is the genomic start position of the ADCY7 gene on human chromosome 16 using the GRCh37 assembly?

SELECT ?startPosition WHERE { wd:Q17709715 p:P644 ?statement . ?statement ps:P644 ?startPosition ; pq:P1057 wd:Q742870 ; pq:P659 wd:Q21067546 . }

Where does the ADCY7 gene start on chromosome 16 in the GRCh37 genome build?

Give me the genomic coordinate (start) for the ADCY7 gene on chromosome 16, based on the GRCh37 reference genome.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/statement/Q17709715-8B220AE3-DF38-4DCD-8175-D71AA799BE61> ?var1 ?var2 . }


Question: What metadata is associated with the genomic end statement for the ADCY7 gene on chromosome 16?

SELECT ?property ?value WHERE { s:Q17709715-2AEA95E0-3044-445B-A276-544504D64EB1 ?property ?value . }

Show all properties and values for the statement that records ADCY7’s genomic end position as 50318135 on chromosome 16 in GRCh38.

What information is stored about the claim that ADCY7 ends at position 50318135 on chromosome 16?

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/statement/Q17709715-2AEA95E0-3044-445B-A276-544504D64EB1> ?var1 ?var2 . }


Question: What InterPro domains and reference sources are associated with the UniProt protein P01308?

PREFIX p: <http://www.wikidata.org/prop/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
SELECT DISTINCT ?protein ?part ?partLabel ?interpro ?source ?url WHERE {
  ?protein wdt:P352 "P01308" ; p:P527 ?statement .
  ?statement ps:P527 ?part .
  ?statement ( prov:wasDerivedFrom / pr:P248 ) ?source ; ( prov:wasDerivedFrom / pr:P854 ) ?url .
  ?part wdt:P2926 ?interpro ; rdfs:label ?partLabel .
  FILTER ( LANG( ?partLabel ) = "en" )
}

For the protein with UniProt ID P01308, what are its parts (as InterPro domains), their English labels, and the sources and URLs of the claims?

List the English-labeled InterPro domains of the protein identified by UniProt ID P01308, along with the reference sources and URLs used to support those associations.

SELECT DISTINCT ?var1 ?var2 ?var3Label ?var4 ?var5Label ?var6 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P352> "O24867"; <http://www.wikidata.org/prop/P527> ?var7 . ?var7 <http://www.wikidata.org/prop/statement/P527> ?var2 . ?var7 ( <http://www.w3.org/ns/prov#wasDerivedFrom> / <http://www.wikidata.org/prop/reference/P248> ) ?var5 ; ( <http://www.w3.org/ns/prov#wasDerivedFrom> / <http://www.wikidata.org/prop/reference/P854> ) ?var6 . ?var2 <http://www.wikidata.org/prop/direct/P2926> ?var4 ; <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . }


Question: What is the most specific category that both Drew Stanton and a Ponzi scheme 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 ?commonSuperclass WHERE {
  wd:Q1258769 wdt:P31 ?type1 .
  ?type1 wdt:P279 * ?commonSuperclass .
  wd:Q219407 wdt:P279 * ?commonSuperclass .
  ?commonSuperclass rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}
ORDER BY ASC(?commonSuperclass)
LIMIT 1

What do Drew Stanton and a Ponzi scheme have in common in terms of their classification in Wikidata?

Through what highest-level concept are Drew Stanton (a football player) and a Ponzi scheme linked in Wikidata’s 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/Q1258769> ; <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/Q219407> ; <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 English Wikipedia pages for anime series.

PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?anime ?wikipediaPage WHERE {
  ?anime wdt:P31 wd:Q1107 .
  ?wikipediaPage schema:about ?anime .
  ?wikipediaPage schema:isPartOf <https://en.wikipedia.org/> .
}
LIMIT 100

What are the English Wikipedia articles about anime?

Show me the anime items and their corresponding English Wikipedia links.

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1107> . ?var3 <http://schema.org/about> ?var1 . ?var3 <http://schema.org/isPartOf> <https://en.wikipedia.org/> . } LIMIT 100


Question: Japanese TV series from Japan with IMDb IDs, directors, production companies, and air dates.

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 schema: <http://schema.org/>
SELECT ?series ?seriesLabel ?japanesePage ?imdbId ?year ?director ?duration ?productionCompany ?startDate ?producer WHERE {
  ?series wdt:P31 wd:Q5398426 ; wdt:P495 wd:Q17 .
  OPTIONAL {
    ?series rdfs:label ?seriesLabel .
    FILTER ( LANG( ?seriesLabel ) = "en" )
  }
  OPTIONAL {
    ?japanesePage schema:about ?series ; schema:inLanguage "ja" .
  }
  OPTIONAL {
    ?series wdt:P345 ?imdbId .
  }
  OPTIONAL {
    ?series wdt:P577 ?pubDate .
    BIND( YEAR( ?pubDate ) AS ?year )
  }
  OPTIONAL {
    ?series wdt:P57 ?director .
  }
  OPTIONAL {
    ?series wdt:P2047 ?duration .
  }
  OPTIONAL {
    ?series wdt:P272 ?productionCompany .
  }
  OPTIONAL {
    ?series wdt:P580 ?startDate .
  }
  OPTIONAL {
    ?series wdt:P162 ?producer .
  }
}

What are Japanese television series, their English titles, Japanese Wikipedia pages, IMDb IDs, years of release, directors, durations, production companies, start dates, and producers?

List Japanese TV series produced in Japan, including their English labels, Japanese Wikipedia links, IMDb IDs, release years, directors, durations, production companies, start dates, and producers.

SELECT ?var1 ?var1Label ?var2 ?var3 ( YEAR ( ?var4 ) AS ?var5 ) ?var6 ?var7 ?var8 ?var9 ?var10 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q21191019> . ?var1 <http://www.wikidata.org/prop/direct/P495> <http://www.wikidata.org/entity/Q17> . ?var2 <http://schema.org/about> ?var1 . ?var2 <http://schema.org/inLanguage> "ja". SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "ja". } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P345> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P577> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P57> ?var6 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P2047> ?var7 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P272> ?var8 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P580> ?var9 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P162> ?var10 . } }


Question: What is the Wikidata item for the movie with IMDb ID tt0116459?

SELECT ?movie WHERE { ?movie wdt:P345 "tt0116459" .}

Which movie or TV show on Wikidata has the IMDb identifier tt0116459?

Show me the Wikidata entry for the item identified by tt0116459 on IMDb.

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


Question: Wikidata item for IMDb ID tt1317481

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item WHERE {
  ?item wdt:P345 "tt1317481" .
}

What is the Wikidata item for the movie with IMDb ID tt1317481?

Show me the Wikidata entry for the film identified by tt1317481 on IMDb.

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


Question: Is the animated series Mighty Max linked to its episode list in Wikidata?

ASK WHERE { ?series wdt:P1811 wd:Q6590302 }

Does Wikidata contain a link from the TV show Mighty Max to its list of episodes?

Is there a connection between the show Mighty Max and its episode list page (Q6590302)?

ASK WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1811> <http://www.wikidata.org/entity/Q6590302> . }


Question: Fictional characters with IMDb IDs and their English names, sorted by Wikipedia popularity.

SELECT DISTINCT ?character ?label ?imdbId ?sitelinkCount WHERE { ?character (wdt:P31/wdt:P279*) wd:Q95074 . OPTIONAL { ?character wikibase:sitelinks ?sitelinkCount . } ?character rdfs:label ?label . ?character wdt:P345 ?imdbId . FILTER (LANG(?label) = "en") } ORDER BY DESC(?sitelinkCount)

Which fictional characters have English Wikipedia labels and IMDb IDs, and which ones are most widely covered across Wikipedia language editions?

List all fictional characters that have an IMDb identifier and an English label, ordered by how many Wikipedia language versions mention them.

SELECT DISTINCT ?var1 ?var2 ?var3 ?var4 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q95074> . OPTIONAL { ?var1 <http://wikiba.se/ontology#sitelinks> ?var4 . } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P345> ?var3 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . } GROUP BY ?var1 ?var2 ?var3 ?var4 ORDER BY DESC( ?var4 )


Question: What Wikidata item has the IMDb ID tt4532038?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?movie WHERE {
  ?movie wdt:P345 "tt4532038" .
}

Which movie on Wikidata is identified by the IMDb ID tt4532038?

Find the Wikidata entity for the movie with IMDb ID tt4532038.

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt4532038". } ORDER BY ASC( ?var1 )


Question: What is the most general category that both Los Angeles and Formula One belong to, based on their classification hierarchy?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?common(?dist1 + ?dist2 AS ?totalDist) WHERE {
  {
    {
      SELECT ?common(0 AS ?dist1) WHERE {
        wd:Q65 wdt:P31 ?common .
      }
    } UNION {
      SELECT ?common(1 AS ?dist1) WHERE {
        wd:Q65 wdt:P31 ?type1 .
        ?type1 wdt:P279 ?common .
      }
    } UNION {
      SELECT ?common(2 AS ?dist1) WHERE {
        wd:Q65 wdt:P31 ?type1 .
        ?type1 wdt:P279 ?mid1 .
        ?mid1 wdt:P279 ?common .
      }
    } UNION {
      SELECT ?common(3 AS ?dist1) WHERE {
        wd:Q65 wdt:P31 ?type1 .
        ?type1 wdt:P279 ?mid1 .
        ?mid1 wdt:P279 ?mid2 .
        ?mid2 wdt:P279 ?common .
      }
    }
  }
  {
    {
      SELECT ?common(0 AS ?dist2) WHERE {
        wd:Q1968 wdt:P31 ?common .
      }
    } UNION {
      SELECT ?common(1 AS ?dist2) WHERE {
        wd:Q1968 wdt:P31 ?type2 .
        ?type2 wdt:P279 ?common .
      }
    } UNION {
      SELECT ?common(2 AS ?dist2) WHERE {
        wd:Q1968 wdt:P31 ?type2 .
        ?type2 wdt:P279 ?mid1 .
        ?mid1 wdt:P279 ?common .
      }
    } UNION {
      SELECT ?common(3 AS ?dist2) WHERE {
        wd:Q1968 wdt:P31 ?type2 .
        ?type2 wdt:P279 ?mid1 .
        ?mid1 wdt:P279 ?mid2 .
        ?mid2 wdt:P279 ?common .
      }
    }
  }
}
ORDER BY ASC(?totalDist)
LIMIT 1

Which organization class is the closest common superclass connecting Los Angeles and Formula One in Wikidata's taxonomy?

Find the entity that is the most central superclass shared by Los Angeles and Formula One, minimizing the sum of their distances in the subclass 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/Q65> ; <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/Q1968> ; <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