Question: Chinese film directors

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?person ?personLabel WHERE {
  ?person wdt:P106 / wdt:P279 * wd:Q3455803 .
  ?person wdt:P27 wd:Q148 .
  ?person rdfs:label ?personLabel .
  FILTER(LANG(?personLabel) = "en")
}
ORDER BY ?personLabel

List all people who are directors (or subclasses of directors) and hold Chinese citizenship, with their English names.

SELECT DISTINCT ?var1 ?var1Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P106> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q3455803> . ?var1 <http://www.wikidata.org/prop/direct/P27> <http://www.wikidata.org/entity/Q148> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "zh,en". } } ORDER BY DESC( ?var2 )


Question: List English titles of films along with their cast members and genres.

SELECT ?film ?filmLabel ?castMemberLabel ?genreLabel WHERE { ?film wdt:P31 wd:Q11424 . ?film rdfs:label ?filmLabel . FILTER (LANG(?filmLabel) = "en") . ?film wdt:P136 ?genre . ?genre rdfs:label ?genreLabel . FILTER (LANG(?genreLabel) = "en") . ?film wdt:P161 ?castMember . ?castMember rdfs:label ?castMemberLabel . FILTER (LANG(?castMemberLabel) = "en") . } LIMIT 200

What are the English titles of films, who are the cast members, and what are the genres of these films?

Show me the English names of films, the actors in them, and their genres.

SELECT ?var1 ?var2 ?var3 ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . ?var1 <http://www.wikidata.org/prop/direct/P136> ?var5 . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var4 . FILTER ( ( ( LANG ( ?var4 ) = "en" ) ) ) . ?var1 <http://www.wikidata.org/prop/direct/P161> ?var6 . ?var6 <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . } LIMIT 200


Question: Common class of Cincinnati and Las Vegas?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonClass WHERE {
  wd:Q43196 wdt:P31 ?commonClass .
  wd:Q23768 wdt:P31 ?commonClass .
}
LIMIT 1

What is the most specific category that both Cincinnati and Las Vegas belong to?

Find a category that both the headquarters of the Cincinnati Bengals and the Las Vegas Raiders share.

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/Q2624848> ; <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/Q223511> ; <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: Who are the directors of Telugu films released between 2010 and 2017?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?director WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film wdt:P57 ?director .
  ?film wdt:P364 wd:Q8097 .
  ?film wdt:P577 ?releaseDate .
  FILTER(?releaseDate >= "2010-01-01T00:00:00Z" ^^ xsd:dateTime)
  FILTER(?releaseDate <= "2017-12-31T00:00:00Z" ^^ xsd:dateTime)
}
LIMIT 500

Can you list all film directors who worked on Telugu-language movies that came out between 2010 and 2017?

Which people directed Telugu movies that were published from January 1, 2010, to December 31, 2017?

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q2526255> . ?var1 <http://www.wikidata.org/prop/direct/P577> ?var2 . 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/P364> <http://www.wikidata.org/entity/Q8097> . OPTIONAL { } FILTER ( ( ( ?var2 >= "2010-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) && ( ?var2 <= "2017-12-31T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . OPTIONAL { } OPTIONAL { } OPTIONAL { } } LIMIT 500


Question: Directors born in 1981 and their birth places and countries.

SELECT ?birthPlace ?birthPlaceLabel ?countryLabel WHERE { ?person wdt:P31 wd:Q5 ; wdt:P106 wd:Q3455803 ; wdt:P569 ?birthDate ; wdt:P19 ?birthPlace . BIND(YEAR(?birthDate) AS ?birthYear) FILTER(?birthYear = 1981) . ?birthPlace wdt:P17 ?country . ?birthPlace rdfs:label ?birthPlaceLabel . ?country rdfs:label ?countryLabel . FILTER(LANG(?birthPlaceLabel) = "en") FILTER(LANG(?countryLabel) = "en") } LIMIT 10

Which directors were born in 1981, and where and in which country were they born?

List the birth places and countries of all human directors born in 1981, with English labels.

SELECT ?var1 ?var1Label ( SAMPLE ( ?var2Label ) AS ?var2Label ) WHERE { BIND ( YEAR ( ?var3 ) AS ?var4 ). ?var5 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var5 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q3455803> . ?var5 <http://www.wikidata.org/prop/direct/P569> ?var3 . ?var5 <http://www.wikidata.org/prop/direct/P19> ?var1 . ?var1 <http://www.wikidata.org/prop/P17> _:b24 . _:b24 <http://www.wikidata.org/prop/statement/P17> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( ( ?var4 = "1981"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . } GROUP BY ?var1 ?var1Label ?var2 LIMIT 10


Question: Journals where José Iriarte published the most papers, with their abbreviations if available.

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 ?journal ?displayLabel(COUNT(?work) AS ?publicationCount) WHERE {
  ?work wdt:P50 wd:Q42907841 .
  ?work wdt:P1433 ?journal .
  ?journal rdfs:label ?journalLabel .
  FILTER(LANG(?journalLabel) = "en")
  OPTIONAL {
    ?journal wdt:P1813 ?journalShortName
  }
  BIND(COALESCE(?journalShortName , ?journalLabel) AS ?displayLabel)
}
GROUP BY ?journal ?displayLabel
ORDER BY DESC(?publicationCount)

Which academic journals have published the most works by archaeologist José Iriarte, and what are their common abbreviations?

List the journals that have published José Iriarte’s research, ordered by the number of publications, showing the journal’s short name if one exists, otherwise its full name.

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


Question: Academic articles that cite "Differences between human and mouse embryonic stem cells"

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?citingArticle WHERE {
  ?citingArticle wdt:P2860 wd:Q45345133 .
}

Which scientific papers cite the article "Differences between human and mouse embryonic stem cells"?

List all scholarly articles that reference the 2004 paper on human and mouse embryonic stem cell differences.

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


Question: Czech Republic postal codes without street addresses, split into first three and last two digits.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item ?postalCode ?administrativeEntity ?firstPart ?secondPart WHERE {
  ?item wdt:P281 ?postalCode ; wdt:P17 wd:Q213 ; wdt:P131 ?administrativeEntity . MINUS {
    ?item wdt:P669 [] .
  }
  FILTER(STRLEN(?postalCode) = 6)
  FILTER(SUBSTR(?postalCode , 4 , 1) = " ")
  BIND(SUBSTR(?postalCode , 1 , 3) AS ?firstPart)
  BIND(SUBSTR(?postalCode , 5 , 2) AS ?secondPart)
}

What are the postal codes in the Czech Republic for locations that don't have a street address, and how are they split into the district and local parts?

List all postal codes in the Czech Republic that are not tied to a specific street address, showing the first three digits and last two digits separately.

SELECT DISTINCT * WHERE { ?var1 <http://www.wikidata.org/prop/direct/P969> ?var2 ; <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q213> ; <http://www.wikidata.org/prop/direct/P131> ?var3 . MINUS { ?var1 <http://www.wikidata.org/prop/direct/P669> [] . } BIND ( STRLANG ( STRBEFORE ( ?var2 , " " ) , "cs" ) AS ?var4 ). BIND ( STRAFTER ( ?var2 , " " ) AS ?var5 ). FILTER ( ( REGEX ( ?var2 , "string1" ) ) ) . }


Question: Scholarly articles citing "The metabolism of glycerophospholipid and its regulation in monocytes and macrophages"

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 ?citingArticle ?citingArticleLabel WHERE {
  ?citingArticle wdt:P2860 wd:Q28609297 .
  ?citingArticle rdfs:label ?citingArticleLabel .
  FILTER(LANG(?citingArticleLabel) = "en")
}

Which academic papers cite the study on the metabolism of glycerophospholipid in monocytes and macrophages?

List the research articles that reference "The metabolism of glycerophospholipid and its regulation in monocytes and macrophages".

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


Question: Which academic articles cite "Concepts and Principles of O-Linked Glycosylation"?

SELECT ?citingArticle WHERE { ?citingArticle wdt:P2860 wd:Q34749639 .}

Articles citing the 1998 paper on O-linked glycosylation

Can you list the scholarly articles that cite the paper "Concepts and Principles of O-Linked Glycosylation"?

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


Question: What is the most specific category that both Las Vegas Boulevard and Silicon Valley belong to?

SELECT ?commonType ?commonTypeLabel (COUNT(?step) AS ?depth)
WHERE {
  wd:Q886257 wdt:P31 ?type1 .
  wd:Q163820 wdt:P31 ?type2 .
  ?type1 wdt:P279* ?commonType .
  ?type2 wdt:P279* ?commonType .
  ?commonType wdt:P279+ ?step .
  OPTIONAL { ?commonType rdfs:label ?commonTypeLabel . FILTER(LANG(?commonTypeLabel) = "en") }
}
GROUP BY ?commonType ?commonTypeLabel
ORDER BY DESC(?depth)
LIMIT 1

What shared type is the lowest common ancestor of Las Vegas Boulevard and Silicon Valley in Wikidata's classification hierarchy?

Which broader category do both Las Vegas Boulevard and Silicon Valley fall under, based on their most specific shared 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/Q886257> ; <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/Q163820> ; <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: Film directors and vice presidents in Wikidata

SELECT ?item ?itemLabel WHERE { VALUES ?occupation { wd:Q2526255 wd:Q42178 } ?item wdt:P106 ?occupation . ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }

Who are the people whose occupation is either film director or vice president?

List all humans who work as film directors or vice presidents, along with their names.

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


Question: What are the categories or types that Dallas and York County, Maine belong to?

SELECT ?dallasClass ?yorkClass WHERE { wd:Q16557 wdt:P31 ?dallasClass . wd:Q390141 wdt:P31 ?yorkClass . }

What classes is Dallas an instance of, and what class is York County, Maine an instance of?

What is the classification of Dallas and York County 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/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/Q390141> ; <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 Israel and Panama belong to?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonAncestor WHERE {
  wd:Q801 wdt:P31 ?c1 .
  wd:Q804 wdt:P31 ?c2 .
  ?c1 wdt:P279 ?commonAncestor .
  ?c2 wdt:P279 ?commonAncestor .
}
LIMIT 1

What do Israel and Panama have in common in terms of their classification in Wikidata?

What is the shared class that includes both the country of Israel and the country of Panama?

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/Q875556> ; <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/Q804> ; <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 Iris Chang and Cologne belong to?

SELECT DISTINCT ?common WHERE { wd:Q234338 wdt:P31 ?type1 . ?type1 wdt:P279* ?common . wd:Q365 wdt:P31 ?type2 . ?type2 wdt:P279* ?common . } ORDER BY ?common LIMIT 1

What superclass do the types of Iris Chang and Cologne have in common?

Which ontological category is shared by the class of Iris Chang and the class of Cologne?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q234338> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q365> ; <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 English-language scholarly articles about hemorrhage that do not have a PubMed ID?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q13442814 ; wdt:P921 wd:Q166019 ; rdfs:label ?itemLabel .
  FILTER(LANG(?itemLabel) = "en")
  . MINUS {
    ?item wdt:P698 ?pmid
  }
}

Show me academic papers on hemorrhage without a PubMed identifier, in English.

Find peer-reviewed articles where hemorrhage is the main topic, in English, and that are not indexed in PubMed.

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


Question: Most frequently used property to link articles to the journal 'Work'

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?property ( COUNT( ?property ) AS ?count ) WHERE {
  ?work ?directProperty wd:Q15762114 .
  ?property wikibase:directClaim ?directProperty .
  ?property rdf:type wikibase:Property .
}
GROUP BY ?property
ORDER BY DESC ( ?count )
LIMIT 1

What property is most commonly used to indicate that a work was published in the journal 'Work'?

Show me the property that links the most works to the journal 'Work'.

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


Question: What are the publication details (issue, volume, date, PubMed ID, and ResearchGate ID) of the article "Regulatory mechanisms involved in the control of ubiquitin homeostasis"?

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 ?propertyLabel ?value WHERE {
  {
    wd:Q28280583 wdt:P433 ?value .
    wd:P433 rdfs:label ?propertyLabel .
    FILTER(LANG(?propertyLabel) = "en")
  } UNION {
    wd:Q28280583 wdt:P478 ?value .
    wd:P478 rdfs:label ?propertyLabel .
    FILTER(LANG(?propertyLabel) = "en")
  } UNION {
    wd:Q28280583 wdt:P577 ?value .
    wd:P577 rdfs:label ?propertyLabel .
    FILTER(LANG(?propertyLabel) = "en")
  } UNION {
    wd:Q28280583 wdt:P5875 ?value .
    wd:P5875 rdfs:label ?propertyLabel .
    FILTER(LANG(?propertyLabel) = "en")
  } UNION {
    wd:Q28280583 wdt:P698 ?value .
    wd:P698 rdfs:label ?propertyLabel .
    FILTER(LANG(?propertyLabel) = "en")
  }
}

Can you tell me the PubMed ID, volume, and publication date of the scholarly article on ubiquitin homeostasis?

Find the issue number, volume, and identifiers like PubMed and ResearchGate for the 2010 paper on ubiquitin regulation.

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


Question: What scholarly articles published by the American Chemical Society cite other works, and what are those cited works?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?article ?citedWork WHERE {
  ?article wdt:P1433 / wdt:P123 wd:Q247556 ; wdt:P2860 ?citedWork ; wdt:P31 wd:Q13442814 .
}
LIMIT 100

Show me citations made by research articles from the ACS journal publications.

Which works are referenced in studies published by the American Chemical Society?

SELECT ?var1 ?var2 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P1433> / <http://www.wikidata.org/prop/direct/P123> ) <http://www.wikidata.org/entity/Q247556> ; <http://www.wikidata.org/prop/direct/P2860> ?var2 . }


Question: Which organizations have Twitter accounts "afpfr" or "Nice_Matin", and how many Wikipedia articles are about them?

SELECT ?item ?twitter (COUNT(?site) AS ?sitelinks) WHERE { ?item wdt:P2002 ?twitter . ?site schema:about ?item . ?site schema:isPartOf ?wiki . VALUES ?twitter { "afpfr" "Nice_Matin" } } GROUP BY ?item ?twitter ORDER BY ASC (?sitelinks)

What are the Twitter handles "afpfr" and "Nice_Matin" linked to in Wikidata, and how many language versions of Wikipedia have articles about those entities?

List the entities associated with the Twitter handles "afpfr" and "Nice_Matin", sorted by the number of Wikipedia language editions that cover them.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "Litlok" ) ( "string1" ) ( "ameli_actu" ) ( "Erdrokan" ) ( "RemiMathis" ) ( "ppi22a" ) ( "string2" ) ( "nojhan" ) ( "Hazukashi1" ) ( "darkoneko" ) ( "string3" ) ( "SocBiblio" ) ( "Miz_Kriss" ) ( "BLMedieval" ) ( "string4" ) ( "maamyisa" ) ( "string5" ) ( "PoulpyWP" ) ( "string6" ) ( "string7" ) ( "FLCL_USA" ) ( "Diimoush" ) ( "WallysOG" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "jeanlucr" ) ( "qffwffq" ) ( "string12" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "RomainDsDz" ) ( "string16" ) ( "string17" ) ( "string18" ) ( "Nice_Matin" ) ( "string19" ) ( "string20" ) ( "ornikkar" ) ( "Mutio" ) ( "GDeleur" ) ( "95ZAYNIKE" ) ( "string21" ) ( "liguenice" ) ( "bernouin" ) ( "string22" ) ( "string23" ) ( "string24" ) ( "string25" ) ( "string26" ) ( "string27" ) ( "EnnieArdi" ) ( "string28" ) ( "funder" ) ( "Vogelsong" ) ( "string29" ) ( "JFKairport" ) ( "string30" ) ( "string31" ) ( "string32" ) ( "Chaoborus" ) ( "string33" ) ( "Neea6" ) ( "afpfr" ) ( "41Strange" ) ( "string34" ) ( "string35" ) ( "string36" ) ( "string37" ) ( "string38" ) ( "Kyro38" ) ( "string39" ) } } ORDER BY ASC( ?var3 )


Question: What are the titles and IMDb IDs of films in the chick flick genre?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?film ?filmTitle ?imdbId WHERE {
  ?film wdt:P136 wd:Q2075808 .
  ?film wdt:P1476 ?filmTitle .
  OPTIONAL {
    ?film wdt:P345 ?imdbId .
  }
}

Show me movies that are chick flicks along with their IMDb identifiers.

Which films belong to the chick flick genre, and what are their IMDb IDs?

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


Question: Which paper from WWW'06 has the highest number of citations, and how many papers share that citation count?

SELECT ?citation_count ( COUNT( ?paper ) AS ?papers_with_same_citation_count ) WHERE { { SELECT ?paper ( COUNT( ?citing_work ) AS ?citation_count ) WHERE { ?paper wdt:P1433 wd:Q27680379 . OPTIONAL { ?citing_work wdt:P2860 ?paper . } } GROUP BY ?paper } } GROUP BY ?citation_count ORDER BY DESC ( ?citation_count )

How many papers published in the Proceedings of the 15th International Conference on World Wide Web (WWW'06) were cited exactly 17 times?

Show the distribution of citation counts for papers in WWW'06, ordered by highest citation count — specifically, how many papers have the most frequent citation count?

SELECT ?var1 ( COUNT ( ?var2 ) AS ?var3 ) WHERE { { SELECT ?var2 ( COUNT ( ?var4 ) AS ?var1 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P1433> <http://www.wikidata.org/entity/Q27680379> . OPTIONAL { ?var4 <http://www.wikidata.org/prop/direct/P2860> ?var2 . } } GROUP BY ?var2 } } GROUP BY ?var1 ORDER BY DESC( ?var1 )


Question: What is the most specific category that both Samaria and Israel–United States relations belong to?

SELECT ?ancestor ?label WHERE { wd:Q1294629 wdt:P31 ?type1 . wd:Q607505 wdt:P31 ?type2 . ?type1 wdt:P279* ?ancestor . ?type2 wdt:P279* ?ancestor . ?ancestor rdfs:label ?label . FILTER(LANG(?label) = "en") } LIMIT 1

What do Samaria and Israel–United States relations have in common in terms of their classification in Wikidata?

What is the highest-level concept that includes both a geographic region and a bilateral relation?

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/Q1294629> ; <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/Q607505> ; <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: Films with their IMDb IDs, English Wikipedia pages, English titles, and film posters.

SELECT ?film ?imdbId ?wikipediaPage ?title ?poster WHERE { ?film wdt:P31 wd:Q11424 . ?film wdt:P345 ?imdbId . ?wikipediaPage schema:about ?film . ?wikipediaPage schema:isPartOf <https://en.wikipedia.org/> . ?film wdt:P1476 ?title . ?film wdt:P3383 ?poster . FILTER(LANG(?title) = "en") } LIMIT 100

What are the English titles, IMDb IDs, Wikipedia links, and poster images for films listed on Wikidata?

Show me a list of films, including their English titles, IMDb identifiers, links to their English Wikipedia pages, and poster images from Wikimedia Commons.

SELECT ?var1 ?var2 ?var3 ?var4 ?var5 ?var6 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var1 <http://www.wikidata.org/prop/direct/P345> ?var3 . ?var4 <http://schema.org/about> ?var1 . ?var4 <http://schema.org/isPartOf> <https://en.wikipedia.org/> . ?var1 <http://www.wikidata.org/prop/direct/P1476> ?var5 . ?var1 <http://www.wikidata.org/prop/direct/P3383> ?var6 . } LIMIT 100


Question: What are the instances and subclasses of pantomime?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?item ?label WHERE {
  {
    ?item wdt:P31 wd:Q13409536
  } UNION {
    ?item wdt:P279 wd:Q13409536
  }
  OPTIONAL {
    ?item rdfs:label ?label .
    FILTER ( LANG( ?label ) = "en" )
  }
}

Which items are either instances of or subclasses of pantomime, and what are their English labels?

List all known pantomime performances and pantomime subgenres with their English names.

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


Question: List of films and their cast members, with actors' names concatenated.

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?work ( GROUP_CONCAT( ?actorLabel ; SEPARATOR = ", " ) AS ?castList ) WHERE {
  ?work p:P161 ?statement .
  ?statement ps:P161 ?actor .
  ?actor rdfs:label ?actorLabel .
  FILTER ( LANG( ?actorLabel ) = "en" )
}
GROUP BY ?work
LIMIT 20

Which movies have cast members listed, and who are the actors in each movie?

Can you show me up to 20 works along with a comma-separated list of their English-speaking cast members?

SELECT ?var1 ( GROUP_CONCAT ( ?var2 ; SEPARATOR = "," ) AS ?var3 ) WHERE { SELECT DISTINCT ?var1 ( ?var4Label AS ?var2 ) WHERE { ?var1 <http://www.wikidata.org/prop/P161> [ <http://www.wikidata.org/prop/statement/P161> ?var4 ] . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } LIMIT 20 } GROUP BY ?var1


Question: Jack Nicholson movies and the characters he played

SELECT ?work ?workLabel ?characterRole WHERE { ?statement ps:P161 wd:Q39792 . ?work p:P161 ?statement . ?statement pq:P453 ?characterRole . OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel) = "en") } } ORDER BY ?work

In which films did Jack Nicholson act, and what roles did he portray?

List all the movies Jack Nicholson appeared in along with the names of the characters he played.

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


Question: What country is both Massachusetts and the Hollywood Bowl located in?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?country WHERE {
  wd:Q771 wdt:P17 ?country .
  wd:Q976218 wdt:P17 ?country .
}

Which country do Massachusetts and the Hollywood Bowl share as their country?

Find the country associated with both Massachusetts and the Hollywood Bowl.

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/Q771> ; <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/Q976218> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var3 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } } ORDER BY ASC( ?var4 ) LIMIT 1


Question: Which countries have GeoNames IDs 1547376 and 6252001?

SELECT DISTINCT ?country WHERE { VALUES ?geoId { "1547376" "6252001" } ?country wdt:P1566 ?geoId . }

What are the Wikidata entities corresponding to the GeoNames IDs 1547376 and 6252001?

Show me the countries identified by GeoNames IDs 1547376 and 6252001.

SELECT DISTINCT ?var1 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P1566> "1547376". } UNION { ?var1 <http://www.wikidata.org/prop/direct/P1566> "6252001". } }


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

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?commonAncestor(COUNT(?instance) AS ?instanceCount) WHERE {
  wd:Q30 wdt:P31 ?type1 .
  ?type1 rdfs:subClassOf * ?commonAncestor .
  wd:Q800 wdt:P31 ?type2 .
  ?type2 rdfs:subClassOf * ?commonAncestor .
  ?instance wdt:P31 ?commonAncestor .
  FILTER(?commonAncestor != wd:Q35120)
  FILTER(?commonAncestor != wd:Q17334923)
}
GROUP BY ?commonAncestor
ORDER BY ASC(?instanceCount)
LIMIT 1

Which class is the least general common superclass of the United States and Costa Rica in Wikidata’s ontology?

Find the shared category with the fewest instances between the United States and Costa Rica.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q800> ; <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/Q3640832> ; <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 geolocated Christmas traditions with their images.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?tradition ?location ?image WHERE {
  ?tradition ( wdt:P31 | wdt:P279 | wdt:P361 ) + wd:Q717040 ; wdt:P625 ?location .
  OPTIONAL {
    ?tradition wdt:P18 ?image .
  }
}

What are the Christmas traditions (such as markets or nativity scenes) around the world, their locations, and which ones have images available?

Show me all Christmas traditions, including their subtypes and parts, along with their geographic coordinates and any associated images from Wikimedia Commons.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> | <http://www.wikidata.org/prop/direct/P279> | <http://www.wikidata.org/prop/direct/P361> )+ <http://www.wikidata.org/entity/Q717040> ; <http://www.wikidata.org/prop/direct/P625> ?var2 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var3 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "ko,en". } }


Question: List books and scholarly articles with English labels.

SELECT ?item ?label ?type WHERE { { ?item wdt:P31 wd:Q571 . BIND(wd:Q571 AS ?type) } UNION { ?item wdt:P31 wd:Q13442814 . BIND(wd:Q13442814 AS ?type) } ?item rdfs:label ?label . FILTER (LANG(?label) = "en") } LIMIT 100

What are the English-labeled books and scholarly articles in Wikidata?

Show me up to 100 English-labeled items that are either books or scholarly articles, along with their type (book or scholarly article).

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q571> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q13442814> . } ?var1 <http://www.wikidata.org/prop/direct/P31> ?var2 . OPTIONAL { ?var2 <http://wikiba.se/ontology#claim> ?var3 . } OPTIONAL { ?var2 <http://wikiba.se/ontology#directClaim> ?var4 . } ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . } LIMIT 100


Question: What property is most commonly used to indicate that an entity is a wedding?

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?propertyItem(COUNT(?propertyItem) AS ?count) WHERE {
  ?item ?directProperty wd:Q49836 .
  ?propertyItem wikibase:directClaim ?directProperty .
  ?propertyItem rdf:type wikibase:Property .
}
GROUP BY ?propertyItem
ORDER BY DESC(?count)
LIMIT 1

Which Wikidata property links the most individuals to their wedding events?

Among all properties used to describe weddings, which one appears most frequently?

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


Question: What metadata is associated with the academic article "Intracellular trafficking of furin is modulated by the phosphorylation state of a casein kinase II site in its cytoplasmic tail"?

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

Show all properties and values for the scholarly article with Wikidata ID Q40790070.

List all the information stored in Wikidata about this 1995 research paper.

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


Question: What are the English and German Wikipedia pages for the movie with IMDb ID tt0468569?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?item ?wikipedia_page WHERE {
  VALUES ?imdb_id {
    "tt0468569"
  }
  ?item wdt:P345 ?imdb_id .
  ?wikipedia_page schema:about ?item ; schema:inLanguage ?lang .
  FILTER(?lang = "en" || ?lang = "de")
  FILTER(regex(str(?wikipedia_page) , "wikipedia\\.org"))
}

Show me the Wikipedia articles in English and German about the film identified by tt0468569 on IMDb.

Which Wikipedia pages in English or German discuss the movie "The Dark Knight" (2008)?

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


Question: What is the most specific common category that both a musical group like Neu! and a U.S. state like Florida belong to, and how many subclass steps are required to reach it from each?

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

What entity is the highest-level shared superclass of musical groups and U.S. states in Wikidata’s taxonomy?

Can you find the common ancestor in the subclass hierarchy between the type of the band Neu! and the type of the state Florida, and show the total number of subclass hops 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/Q181874> ; <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/Q812> ; <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 closely related abstract category shared by humans and New South Wales in the Wikidata hierarchy?

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

Which concept is the closest common ancestor in the subclass hierarchy between a human and the state of New South Wales?

Find the entity that minimizes the total number of subclass steps from both 'human' and 'state of Australia'.

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/Q43432> ; <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/Q3224> ; <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: Italian film titles and their release years, sorted by most recent first.

SELECT ?film ?label ?year WHERE { ?film wdt:P31 wd:Q11424 . ?film rdfs:label ?label . ?film wdt:P577 ?date . BIND( STR( YEAR( ?date ) ) AS ?year ) FILTER ( LANG( ?label ) = "it" ) } ORDER BY DESC ( ?year )

What are the Italian-language titles of films and when were they released, ordered from newest to oldest?

List all films in Italian with their publication years, sorted in descending order of release year.

SELECT ?var1 ?var1Label ?var2 ( ?var2 AS ?var3 ) WHERE { BIND ( STR ( YEAR ( ?var4 ) ) AS ?var2 ). ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var1 <http://www.wikidata.org/prop/direct/P577> ?var4 . FILTER ( ( ( LANG ( ?var1Label ) = "it" ) ) ) . } ORDER BY DESC( ?var2 )


Question: List terrorist organizations and their English labels and descriptions.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?organization ?label ?description WHERE {
  ?organization ( wdt:P31 / wdt:P279 * ) wd:Q17127659 .
  OPTIONAL {
    ?organization rdfs:label ?label .
    FILTER ( LANG( ?label ) = "en" )
  }
  OPTIONAL {
    ?organization schema:description ?description .
    FILTER ( LANG( ?description ) = "en" )
  }
}

What are the English names and descriptions of all terrorist organizations recognized on Wikidata?

Show me the names and English descriptions of all entities that are either instances or subclasses of terrorist organizations, including those without descriptions.

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


Question: What are the titles of all films and their English labels?

SELECT ?film ?filmLabel ?title WHERE { ?film (wdt:P31/wdt:P279*) wd:Q11424 . ?film wdt:P1476 ?title . ?film rdfs:label ?filmLabel . FILTER(LANG(?filmLabel) = "en") }

List all films (including subtypes of film) along with their English names and original titles.

Show me the English labels and titles of all cinematic works in Wikidata.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q11424> . ?var1 <http://www.wikidata.org/prop/direct/P1476> ?var2 . FILTER ( ( STRSTARTS ( ?var2 , "''" ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "cs,en". ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . } }


Question: What entities and properties are linked to the academic article "Role of molecular chaperones in G protein beta5/regulator of ... dimer assembly and G protein betagamma dimer specificity"?

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

Which scientific articles cite the paper titled "Role of molecular chaperones in G protein beta5/regulator of ... dimer assembly and G protein betagamma dimer specificity", and what other metadata is associated with it?

Show me all the relationships that connect other items to the academic article Q24317450, including citations and references.

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


Question: Which football clubs have Twitter accounts "RCLens" or "BPFC24", and how many Wikipedia pages do they have?

SELECT ?club ?twitter (COUNT(?sitelink) AS ?sitelinkCount) WHERE { ?club wdt:P2002 ?twitter . ?sitelink schema:about ?club . VALUES ?twitter { "RCLens" "BPFC24" } } GROUP BY ?club ?twitter ORDER BY ASC(?sitelinkCount)

What are the Twitter handles of the football clubs R.C. Lens and Bergerac Périgord FC, and how many Wikipedia articles are linked to each?

Show me the Twitter usernames and Wikipedia sitelink counts for the football clubs with Twitter handles "RCLens" and "BPFC24", sorted by the number of Wikipedia pages.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "BPFC24" ) ( "string1" ) ( "LensoisCom" ) ( "string2" ) ( "string3" ) ( "RCLens" ) ( "string4" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "LaCAB24" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "Bergerac95" ) ( "CFBPFC" ) } } ORDER BY ASC( ?var3 )


Question: Which Wikidata entities have the Twitter username "lequipe", and how many Wikipedia articles are about them?

SELECT ?entity ?username (COUNT(?site) AS ?sitelinks) WHERE { ?entity wdt:P2002 ?username . ?site schema:about ?entity ; schema:isPartOf ?wiki . VALUES ?username { "lequipe" } } GROUP BY ?entity ?username ORDER BY ASC(?sitelinks)

What is the Twitter handle "lequipe" linked to in Wikidata, and how many language versions of Wikipedia have articles on that entity?

Show me the entity associated with the Twitter username "lequipe", along with the number of Wikipedia language editions that cover it, sorted by least popular first.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "Cortiglia" ) ( "string2" ) ( "string3" ) ( "string4" ) ( "string5" ) ( "lequipe" ) ( "RMCsport" ) ( "Pierre_B_y" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "KVal3003" ) ( "string12" ) ( "emure15" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "string16" ) } } ORDER BY ASC( ?var3 )


Question: What is the most specific shared category between a hotel like Mandalay Bay and a country like Panama?

SELECT ?ancestor ?distHotel ?distState (?distHotel + ?distState AS ?totalDist) WHERE { { SELECT ?ancestor (COUNT(?mid) AS ?distHotel) WHERE { wd:Q27686 wdt:P279+ ?mid . ?mid wdt:P279* ?ancestor . } GROUP BY ?ancestor HAVING (?distHotel <= 10) } { SELECT ?ancestor (COUNT(?mid) AS ?distState) WHERE { wd:Q3624078 wdt:P279+ ?mid . ?mid wdt:P279* ?ancestor . } GROUP BY ?ancestor HAVING (?distState <= 10) } } ORDER BY ASC(?totalDist) LIMIT 1

Which class do both hotels and sovereign states belong to, with the shortest path in the Wikidata hierarchy?

Find the common ancestor class with the least total subclass steps from the hotel class and the sovereign state class.

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/Q1368043> ; <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/Q804> ; <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 works cited by the article "Speeding up enzyme engineering computationally", and what is its main subject, publication date, and venue?

SELECT ?authorLabel ?citedWorkLabel ?publicationDate ?publishedInLabel ?languageLabel ?mainSubjectLabel ?fullTextURL WHERE {
  OPTIONAL {
    wd:Q42319091 wdt:P50 ?author .
    ?author rdfs:label ?authorLabel .
    FILTER(LANG(?authorLabel) = "en")
  }
  OPTIONAL {
    wd:Q42319091 wdt:P2860 ?citedWork .
    ?citedWork rdfs:label ?citedWorkLabel .
    FILTER(LANG(?citedWorkLabel) = "en")
  }
  OPTIONAL {
    wd:Q42319091 wdt:P577 ?publicationDate .
  }
  OPTIONAL {
    wd:Q42319091 wdt:P1433 ?publishedIn .
    ?publishedIn rdfs:label ?publishedInLabel .
    FILTER(LANG(?publishedInLabel) = "en")
  }
  OPTIONAL {
    wd:Q42319091 wdt:P407 ?language .
    ?language rdfs:label ?languageLabel .
    FILTER(LANG(?languageLabel) = "en")
  }
  OPTIONAL {
    wd:Q42319091 wdt:P921 ?mainSubject .
    ?mainSubject rdfs:label ?mainSubjectLabel .
    FILTER(LANG(?mainSubjectLabel) = "en")
  }
  OPTIONAL {
    wd:Q42319091 wdt:P953 ?fullTextURL .
  }
}

Can you list the articles referenced in the 2016 paper on enzyme engineering and tell me where it was published and what its topic is?

Show me the publication details of the scholarly article "Speeding up enzyme engineering computationally", including its cited references, main subject, journal, and publication date.

SELECT ?var1 ?var2Label ?var3 ?var4Label ?var5 ?var6Label ?var7 ?var8 ?var9Label ?var10 ?var11Label ?var12 ?var13Label ?var14 WHERE { OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P50> ?var1 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . FILTER ( ( ( LANG ( ?var2Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P2860> ?var3 . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var4Label . FILTER ( ( ( LANG ( ?var4Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> ^ <http://www.wikidata.org/prop/direct/P2860> ?var5 . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var6Label . FILTER ( ( ( LANG ( ?var6Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P577> ?var7 . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P1433> ?var8 . ?var8 <http://www.w3.org/2000/01/rdf-schema#label> ?var9Label . FILTER ( ( ( LANG ( ?var9Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P407> ?var10 . ?var10 <http://www.w3.org/2000/01/rdf-schema#label> ?var11Label . FILTER ( ( ( LANG ( ?var11Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P921> ?var12 . ?var12 <http://www.w3.org/2000/01/rdf-schema#label> ?var13Label . FILTER ( ( ( LANG ( ?var13Label ) = "en" ) ) ) . } OPTIONAL { <http://www.wikidata.org/entity/Q42319091> <http://www.wikidata.org/prop/direct/P953> ?var14 . } } OFFSET 0 LIMIT 100000


Question: Twitter username "elonmusk" and number of Wikipedia sitelinks

SELECT ?user ?username (COUNT(?link) AS ?sitelinkCount) WHERE { ?user wdt:P2002 ?username . ?link schema:isPartOf ?site ; schema:about ?user . VALUES ?username { "elonmusk" } } GROUP BY ?user ?username ORDER BY ASC(?sitelinkCount)

Who has the Twitter/X username "elonmusk", and how many Wikipedia language editions have articles about them?

Show me the entity with the Twitter handle "elonmusk" and the count of its Wikipedia sitelinks, sorted by the number of sitelinks.

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


Question: What are the title, publication date, DOI, PubMed ID, PMC ID, journal, and language of the article "Protein export at the ER: loading big collagens into COPII carriers"?

SELECT ?title ?publicationDate ?doi ?pubmedId ?pmcId ?journal ?language WHERE { wd:Q27023633 wdt:P1476 ?title . wd:Q27023633 wdt:P577 ?publicationDate . wd:Q27023633 wdt:P356 ?doi . wd:Q27023633 wdt:P698 ?pubmedId . wd:Q27023633 wdt:P932 ?pmcId . wd:Q27023633 wdt:P1433 ?journal . wd:Q27023633 wdt:P407 ?language . }

Can you provide the key publication details — including title, date, DOI, PubMed and PMC IDs, journal, and language — for the 2011 scientific article on protein export in the ER?

Show me the metadata for the scholarly article titled "Protein export at the ER: loading big collagens into COPII carriers", including its publication information and identifiers.

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


Question: Academic publications published on December 22, 2017.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?item ?itemLabel WHERE {
  ?item wdt:P577 "2017-12-22T00:00:00Z" ^^ xsd:dateTime .
  ?item rdfs:label ?itemLabel .
  FILTER ( LANG( ?itemLabel ) = "en" )
}
LIMIT 10000

What academic papers were published on December 22, 2017?

List the English titles of all scholarly works published on December 22, 2017.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { ?var1 ?var3 "2017-12-22T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . ?var4 <http://wikiba.se/ontology#directClaim> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en,de,ru,fr,es,it,ja,zh". } } LIMIT 10000


Question: What are some geographical locations with a GeoNames ID and their corresponding countries in English?

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

Show me places that have a GeoNames identifier and the countries they belong to, with English labels.

List locations with GeoNames IDs along with their country names in English.

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


Question: How many scientific articles cited the 2016 study on transcriptional start sites in Haloferax volcanii each year, starting from the most recent year?

SELECT ?year (COUNT(DISTINCT ?citing) AS ?count) WHERE { ?citing wdt:P2860 wd:Q30017423 . ?citing wdt:P577 ?date . BIND(STR(YEAR(?date)) AS ?year) } GROUP BY ?year ORDER BY DESC(?year)

Show the number of publications that reference the dRNA-Seq study on Haloferax volcanii, grouped by their publication year.

Which years saw the most citations of the article "Genome-wide identification of transcriptional start sites in ... Haloferax volcanii" based on differential RNA-Seq?

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


Question: What are the Wikidata entities with Twitter handles "neiltyson" or "NASA"?

SELECT ?item ?twitterHandle WHERE { ?item wdt:P2002 ?twitterHandle . FILTER(?twitterHandle = "neiltyson" || ?twitterHandle = "NASA") }

Which public figures or organizations on Wikidata use the Twitter usernames neiltyson or NASA?

Show me the entities linked to the Twitter accounts @neiltyson and @NASA in Wikidata.

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


Question: Which entities have Twitter handles FFCyclisme, LeTour, bergen2017, or Maxime_Cam, sorted by Wikipedia notability?

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?twitter WHERE {
  ?item wdt:P2002 ?twitter .
  VALUES ?twitter {
    "FFCyclisme" "LeTour" "bergen2017" "Maxime_Cam"
  }
}
ORDER BY DESC ( wikibase:sitelinks )

Who are the Wikidata entities associated with the Twitter usernames FFCyclisme or LeTour, and which one is more notable?

List the Wikidata items for the Twitter accounts FFCyclisme and LeTour, ordered by how many Wikipedia articles exist about them.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "string3" ) ( "string4" ) ( "FFCyclisme" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "string13" ) ( "LeTour" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "string17" ) ( "string18" ) ( "string19" ) ( "bergen2017" ) ( "string20" ) ( "string21" ) ( "string22" ) ( "Maxime_Cam" ) ( "string23" ) ( "string24" ) ( "string25" ) ( "string26" ) ( "string27" ) ( "string28" ) ( "string29" ) } } ORDER BY ASC( ?var3 )


Question: What is the most specific category that both Twitter and Google belong to, based on their type hierarchies?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonAncestor(?distTwitter + ?distGoogle AS ?totalDistance) WHERE {
  {
    SELECT ?commonAncestor(COUNT(?mid) AS ?distTwitter) WHERE {
      wd:Q918 wdt:P31 ?type .
      ?type wdt:P279 + ?mid .
      ?mid wdt:P279 * ?commonAncestor .
    }
    GROUP BY ?commonAncestor
  }
  {
    SELECT ?commonAncestor(COUNT(?mid) AS ?distGoogle) WHERE {
      wd:Q95 wdt:P31 ?type .
      ?type wdt:P279 + ?mid .
      ?mid wdt:P279 * ?commonAncestor .
    }
    GROUP BY ?commonAncestor
  }
}
ORDER BY ASC(?totalDistance)
LIMIT 1

Which Internet service category is the closest common ancestor of Twitter and Google in Wikidata’s ontology?

Find the shared superclass of Twitter and Google with the smallest total distance 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/Q918> ; <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/Q95> ; <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 places in Romania?

SELECT ?item ?itemLabel WHERE { ?item wdt:P17 wd:Q218 . FILTER(STRSTARTS(STR(?item), "http://www.wikidata.org/entity/Q")) . ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }

Can you list the names of cities, towns, and other locations in Romania?

Which entities (like cities or landmarks) located in Romania have English labels?

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


Question: Scholarly articles and locations of their publishing institutions

SELECT ?article ?articleLabel ?location WHERE { ?article wdt:P31 wd:Q13442814 ; wdt:P50 ?author . ?author wdt:P625 ?location . ?article rdfs:label ?articleLabel . FILTER(LANG(?articleLabel) = "en")}

What are the titles of scholarly articles and where are the institutions that authored them located?

Show me the English titles of scholarly articles along with the geographic coordinates of their authoring institutions.

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


Question: Equestrian statues in Germany with English labels

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?statue ?label WHERE {
  ?statue wdt:P31 wd:Q860861 .
  ?statue wdt:P17 wd:Q183 .
  ?statue wdt:P136 wd:Q659396 .
  ?statue rdfs:label ?label .
  FILTER(LANG(?label) = "en")
}
LIMIT 100

What are the English names of equestrian statues located in Germany?

List all equestrian statues in Germany along with their English labels.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q860861> . ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q183> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var1 <http://www.wikidata.org/prop/direct/P136> <http://www.wikidata.org/entity/Q659396> . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . } LIMIT 100


Question: List all IANA time zones in English.

PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?timezone ?timezoneLabel WHERE {
  ?timezone wdt:P31 wd:Q17272692 .
  ?timezone schema:name ?timezoneLabel .
  FILTER ( LANG( ?timezoneLabel ) = "en" )
}

What are the English names of all time zones defined in the IANA time zone database?

Show me the list of time zones from the IANA database along with their English labels.

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


Question: How many works cited by Douglas Hofstadter were published each year, and were they authored by him?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?year(COUNT(DISTINCT ?citedWork) AS ?count) ?isAuthoredByHofstadter WHERE {
  ?hofstadterWork wdt:P50 wd:Q319308 .
  ?citedWork wdt:P2860 ?hofstadterWork .
  ?citedWork wdt:P577 ?publicationDate .
  BIND(STR(YEAR(?publicationDate)) AS ?year)
  BIND(IF(EXISTS {
    ?citedWork wdt:P50 wd:Q319308
  }
  , "yes" , "no") AS ?isAuthoredByHofstadter)
  FILTER(ISLITERAL(?publicationDate))
}
GROUP BY ?year ?isAuthoredByHofstadter
ORDER BY DESC(?year)

Can you show the yearly count of works cited by Douglas Hofstadter, indicating whether each was written by him?

Which years saw the most citations of works by other authors in Douglas Hofstadter’s publications?

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


Question: Works about comfort women and their publication dates

SELECT ?work ?publicationDate ?workLabel WHERE { ?work wdt:P921 wd:Q713540 . ?work wdt:P577 ?publicationDate . ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel) = "en") } LIMIT 100

What are the publications on the topic of comfort women and when were they published?

List English-language works that focus on the comfort women issue along with their publication dates.

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


Question: Works citing Graham Collingridge by publication year, distinguishing self-citations from external citations.

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

In which years were works published that cite Graham Collingridge’s research, and how many of those were written by him versus others?

Show me the count of works that cite Graham Collingridge’s publications, grouped by year and whether they are self-citations or not.

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


Question: How many articles were published each year in the Journal of Roman Archaeology and the Proceedings of the Theoretical Roman Archaeology Conference?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?year(COUNT(?article) AS ?count) ?journal WHERE {
  VALUES ?journal {
    wd:Q15762030 wd:Q42752846
  }
  ?article wdt:P1433 ?journal .
  ?article wdt:P577 ?pubDate .
  BIND(YEAR(?pubDate) AS ?year)
}
GROUP BY ?year ?journal
ORDER BY ASC(?year)

Show the annual count of articles published in the Journal of Roman Archaeology and TRAC Proceedings, grouped by year.

What is the yearly publication trend for articles in the Journal of Roman Archaeology and Proceedings of the Theoretical Roman Archaeology Conference?

SELECT ?var1 ( COUNT ( ?var2 ) AS ?var3 ) ?var4 ?var4Label WHERE { VALUES ( ?var4 ) { ( <http://www.wikidata.org/entity/Q15762030> ) ( <http://www.wikidata.org/entity/Q42752846> ) } BIND ( STR ( YEAR ( ?var5 ) ) AS ?var1 ). ?var2 <http://www.wikidata.org/prop/direct/P1433> ?var4 . ?var2 <http://www.wikidata.org/prop/direct/P577> ?var5 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var4 ?var4Label ORDER BY ASC( ?var1 )


Question: How many articles published in Nottingham Medieval Studies have been cited 0 times, 1 time, 2 times, etc.?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?citationCount ( COUNT( ?article ) AS ?articleCount ) WHERE {
  {
    SELECT ?article ( COUNT( ?citation ) AS ?citationCount ) WHERE {
      ?article wdt:P1433 wd:Q15759627 .
      OPTIONAL {
        ?citation wdt:P2860 ?article .
      }
    }
    GROUP BY ?article
  }
}
GROUP BY ?citationCount
ORDER BY DESC ( ?citationCount )

Citation distribution of articles in Nottingham Medieval Studies

Show me a histogram of how often articles from Nottingham Medieval Studies are cited, grouped by the number of citations per article.

SELECT ?var1 ( COUNT ( ?var2 ) AS ?var3 ) WHERE { { SELECT ?var2 ( COUNT ( ?var4 ) AS ?var1 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P1433> <http://www.wikidata.org/entity/Q15759627> . OPTIONAL { ?var4 <http://www.wikidata.org/prop/direct/P2860> ?var2 . } } GROUP BY ?var2 } } GROUP BY ?var1 ORDER BY DESC( ?var1 )


Question: How many articles in Open Archaeology have been cited 0 times, 1 time, 2 times, etc.?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?citationCount ( COUNT( ?article ) AS ?articleCount ) WHERE {
  {
    SELECT ?article ( COUNT( ?citingWork ) AS ?citationCount ) WHERE {
      ?article wdt:P1433 wd:Q46863078 .
      OPTIONAL {
        ?citingWork wdt:P2860 ?article .
      }
    }
    GROUP BY ?article
  }
}
GROUP BY ?citationCount
ORDER BY DESC ( ?citationCount )

Citation count distribution of articles published in Open Archaeology

Show me how many articles in Open Archaeology have each possible number of citations, sorted from highest to lowest citation count.

SELECT ?var1 ( COUNT ( ?var2 ) AS ?var3 ) WHERE { { SELECT ?var2 ( COUNT ( ?var4 ) AS ?var1 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P1433> <http://www.wikidata.org/entity/Q46863078> . OPTIONAL { ?var4 <http://www.wikidata.org/prop/direct/P2860> ?var2 . } } GROUP BY ?var2 } } GROUP BY ?var1 ORDER BY DESC( ?var1 )


Question: Scholarly articles published between 2016 and 2018 without an Italian description.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?article ?publicationDate WHERE {
  ?article wdt:P31 wd:Q13442814 ; wdt:P577 ?publicationDate .
  FILTER(NOT EXISTS {
    ?article schema:description ?description .
    FILTER(LANG(?description) = "it")
  })
}
LIMIT 100

What are the publication dates of scholarly articles that do not have a description in Italian?

List scholarly articles and their publication dates, excluding those with an Italian-language description.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q13442814> ; <http://www.wikidata.org/prop/direct/P577> ?var2 . FILTER ( ( NOT EXISTS { ?var1 <http://schema.org/description> ?var3 . FILTER ( ( ( LANG ( ?var3 ) = "it" ) ) ) . } ) ) . } LIMIT 100


Question: English label and description of the animated short film "The Cow" (1989)

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

What is the English name and description of the 1989 animated film "The Cow"?

Can you provide the English label and description of the film "The Cow" directed by Aleksandr Petrov, along with its image if available?

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


Question: Which organizations have Twitter accounts and how many Wikipedia language editions cover them? Show in order of least coverage.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?item ?handle(COUNT(?sitelink) AS ?sitelinkCount) WHERE {
  {
    ?item wdt:P2002 "UN" .
    BIND("UN" AS ?handle)
  } UNION {
    ?item wdt:P2002 "thebeatles" .
    BIND("thebeatles" AS ?handle)
  } UNION {
    ?item wdt:P2002 "BBCNews" .
    BIND("BBCNews" AS ?handle)
  } UNION {
    ?item wdt:P2002 "NASA" .
    BIND("NASA" AS ?handle)
  }
  .
  ?sitelink schema:about ?item .
  ?sitelink schema:isPartOf ?site .
  FILTER(STRSTARTS(STR(?site) , "https://"))
}
GROUP BY ?item ?handle
ORDER BY ASC(?sitelinkCount)

What are the Twitter handles of major organizations like the UN, NASA, BBC News, and The Beatles, and how many Wikipedia versions mention each?

List the Twitter usernames for the United Nations, NASA, BBC News, and The Beatles, along with the number of Wikipedia language versions they appear in, sorted by least to most coverage.

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


Question: What is the Wikidata item for the Twitter account "nantesfr"?

SELECT ?item ?username WHERE { ?item wdt:P2002 ?username . VALUES ?username { "nantesfr" } } ORDER BY ASC(wikibase:sitelinks)

Which entity on Wikidata has the Twitter handle @nantesfr, and how many Wikipedia links does it have?

Can you find the Wikidata entry for the Twitter username "nantesfr", sorted by the number of language editions it appears in?

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "LaRumeur" ) ( "string2" ) ( "string3" ) ( "PickUpProd" ) ( "string4" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "RomoElvis" ) ( "nantesfr" ) ( "string12" ) ( "Radio_Prun" ) ( "Siboy_BMG" ) ( "Sdanitsa" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "Hipskor" ) } } ORDER BY ASC( ?var3 )


Question: Which Wikidata entities have Twitter usernames bbc5live, NOCnews, or PlymUni?

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

What are the Wikidata items associated with the Twitter handles bbc5live, NOCnews, and PlymUni?

Show me the Wikidata entities for the Twitter accounts bbc5live, NOCnews, and PlymUni.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "BAS_News" ) ( "BAS_Jobs" ) ( "string1" ) ( "GovBAT" ) ( "string2" ) ( "Dr_Gilbz" ) ( "string3" ) ( "string4" ) ( "rdlarter" ) ( "string5" ) ( "NOCnews" ) ( "string6" ) ( "OldestIce" ) ( "string7" ) ( "string8" ) ( "PlymUni" ) ( "string9" ) ( "bbc5live" ) ( "jawalkup" ) ( "GovSGSSI" ) ( "string10" ) ( "string11" ) ( "maxhollo" ) } } ORDER BY ASC( ?var3 )


Question: What Wikidata entity has the Twitter username "BarackObama"?

SELECT ?item ?handle WHERE { ?item wdt:P2002 ?handle . FILTER(?handle = "BarackObama") } ORDER BY ?item

Which person or organization is linked to the Twitter handle @BarackObama in Wikidata?

Show me the Wikidata item for the Twitter account "BarackObama".

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


Question: Which properties are most frequently used to link items to August 26 in Wikidata?

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?property ?propertyLabel ?count WHERE {
  {
    SELECT ?property ( COUNT( ?item ) AS ?count ) WHERE {
      ?item ?prop wd:Q2820 .
      ?property wikibase:directClaim ?prop .
    }
    GROUP BY ?property
    HAVING ( ?count > 1 )
  }
  ?property rdfs:label ?propertyLabel .
  FILTER ( LANG( ?propertyLabel ) = "en" )
}
ORDER BY DESC ( ?count )

What are the properties that connect more than one item to August 26, and how many items are linked by each?

Show me the properties that are used to associate multiple entities with August 26, sorted by how often they are used, along with their English labels and counts.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { { SELECT ?var1 ( COUNT ( ?var4 ) AS ?var3 ) WHERE { ?var4 ?var5 <http://www.wikidata.org/entity/Q2820> . ?var1 <http://wikiba.se/ontology#directClaim> ?var5 . } GROUP BY ?var1 ?var1Label HAVING ( ( ?var3 > "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "pl,en". } } ORDER BY DESC( ?var3 )


Question: Which entities on Wikidata have the Twitter usernames FFRugby, UBBrugby, TeddyThoms, Sebtao, Danielktz, or EffetPap?

SELECT ?item ?username WHERE { ?item wdt:P2002 ?username . VALUES ?username { "FFRugby" "UBBrugby" "TeddyThoms" "Sebtao" "Danielktz" "EffetPap" } }

Can you show me the Wikidata items that are associated with these Twitter handles: FFRugby, UBBrugby, TeddyThoms, Sebtao, Danielktz, and EffetPap?

Who are the people or organizations on Wikidata using any of these Twitter accounts: FFRugby, UBBrugby, TeddyThoms, Sebtao, Danielktz, or EffetPap?

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "UBBrugby" ) ( "bmw" ) ( "string2" ) ( "ActusProD2" ) ( "string3" ) ( "FFRugby" ) ( "UArena" ) ( "string4" ) ( "TeddyThoms" ) ( "string5" ) ( "Danielktz" ) ( "string6" ) ( "Kineloic" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "EffetPap" ) ( "string10" ) ( "raph_perry" ) ( "Sebtao" ) ( "string11" ) ( "string12" ) ( "ffrugby" ) ( "string13" ) } } ORDER BY ASC( ?var3 )


Question: Which entity has the Twitter username "BBCNews"?

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

Find the Wikidata item associated with the Twitter handle BBCNews.

What is the Wikidata entity for the Twitter account @BBCNews?

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "greymaIkin" ) ( "Zaira26RR" ) ( "shesfabb" ) ( "anthromilo" ) ( "string1" ) ( "ECO_PT" ) ( "string2" ) ( "string3" ) ( "string4" ) ( "LAUFanatic" ) ( "string5" ) ( "oikos_JP" ) ( "ukiukimiho" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "YouTube" ) ( "string9" ) ( "_O_O__O_O" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "hekreates" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "string17" ) ( "string18" ) ( "CNET" ) } } ORDER BY ASC( ?var3 )


Question: What are the properties and values associated with the NOS Alive music festival?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?property ?propertyLabel ?value WHERE {
  {
    wd:Q1164378 ?property ?value .
    FILTER(STRSTARTS(STR(?property) , "http://www.wikidata.org/prop/direct/"))
    BIND(IRI(REPLACE(STR(?property) , "http://www.wikidata.org/prop/direct/" , "http://www.wikidata.org/entity/")) AS ?propEntity)
    ?propEntity rdfs:label ?propertyLabel .
    FILTER(LANG(?propertyLabel) = "en")
  } UNION {
    wd:Q1164378 ?property ?value .
    FILTER(STRSTARTS(STR(?property) , "http://schema.org/"))
    BIND(?property AS ?propertyLabel)
  }
}
ORDER BY ?property

Can you list all the details about the NOS Alive festival, such as its official website, location, and descriptions in different languages?

Show me all the direct information available for NOS Alive, including its name in different languages, website, and location coordinates.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/Q1164378> ?var1 ?var2 . } ORDER BY ASC( ?var1 )ASC( ?var2 )


Question: Which organizations or people on Wikidata have Twitter handles like "top14rugby", "FFRugby", or "girondins"?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?entity ?twitterHandle WHERE {
  ?entity wdt:P2002 ?twitterHandle .
  FILTER ( STR( ?twitterHandle ) IN ( "top14rugby" , "FFRugby" , "girondins" , "canalplus" , "UBBrugby" , "jb_dubie" , "MatmutAtl" , "NaconFR" ) )
}
ORDER BY ?twitterHandle

Can you list the Wikidata entities that are associated with the Twitter usernames "top14rugby", "FFRugby", "girondins", "canalplus", "UBBrugby", "jb_dubie", "MatmutAtl", and "NaconFR"?

Show me the entities linked to these French rugby and media-related Twitter accounts: top14rugby, FFRugby, girondins, canalplus, UBBrugby, jb_dubie, MatmutAtl, and NaconFR.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "MatmutAtl" ) ( "string3" ) ( "UBBrugby" ) ( "string4" ) ( "top14rugby" ) ( "string5" ) ( "jb_dubie" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "string9" ) ( "NaconFR" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "string13" ) ( "string14" ) ( "AvaaArt" ) ( "string15" ) ( "QuentinDer" ) ( "string16" ) ( "Amendonne" ) ( "canalplus" ) ( "string17" ) ( "string18" ) ( "string19" ) ( "AdamCoopy" ) ( "string20" ) ( "string21" ) ( "string22" ) ( "string23" ) ( "string24" ) ( "string25" ) ( "girondins" ) ( "20h33" ) ( "FFRugby" ) ( "string26" ) ( "string27" ) ( "string28" ) } } ORDER BY ASC( ?var3 )


Question: What properties in Wikidata are used with qualifiers indicating the year 711?

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?mainProperty ?mainPropertyLabel WHERE {
  ?statement ?qualifierProperty wd:Q23519 .
  ?mainProperty wikibase:directClaim ?qualifierProperty .
  ?mainProperty rdfs:label ?mainPropertyLabel .
  FILTER ( LANG( ?mainPropertyLabel ) = "en" )
}
LIMIT 100

Which direct properties have statements that include the year 711 as a qualifier?

Can you list the main properties that are qualified by the year 711 in Wikidata?

SELECT ?var1 ?var1Label ?var2 ?var2Label WHERE { ?var1 ?var3 <http://www.wikidata.org/entity/Q32812665> . ?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: Which properties in Wikidata are related to duration and have German labels and descriptions?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?relatedProperty ?label ?description WHERE {
  wd:P2047 wdt:P1659 ?relatedProperty .
  ?relatedProperty rdfs:label ?label .
  ?relatedProperty schema:description ?description .
  FILTER ( LANG( ?label ) = "de" ) .
  FILTER ( LANG( ?description ) = "de" ) .
}

What are the German labels and descriptions of properties that are marked as related to the duration property (P2047)?

Show me the German labels and descriptions of properties that are linked as related to the duration property in Wikidata.

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


Question: Which Wikidata items have the Twitter usernames "emcandre", "metmuseum", or "sadads"?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?twitterUsername WHERE {
  ?item wdt:P2002 ?twitterUsername .
  VALUES ?twitterUsername {
    "emcandre" "metmuseum" "sadads"
  }
}

Who or what organizations are associated with the Twitter handles @emcandre, @metmuseum, and @sadads on Wikidata?

Show me the Wikidata entities for the Twitter accounts emcandre, metmuseum, and sadads.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "JihadiInfo" ) ( "string1" ) ( "string2" ) ( "string3" ) ( "metmuseum" ) ( "sadads" ) ( "emcandre" ) ( "string4" ) ( "string5" ) } }


Question: Top entities with Twitter accounts by Wikipedia sitelinks

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?entity ?username ( COUNT( ?sitelink ) AS ?sitelinks ) WHERE {
  ?entity wdt:P2002 ?username .
  ?sitelink schema:about ?entity .
  FILTER ( STRSTARTS( STR( ?sitelink ) , "https://" ) )
}
GROUP BY ?entity ?username
ORDER BY DESC ( ?sitelinks )

Which entities have Twitter/X usernames and the most Wikipedia language editions?

Show me notable entities with Twitter accounts, ranked by how many Wikipedia pages they have.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "iampawan31" ) ( "imocan_167" ) ( "ivy0007" ) ( "string1" ) ( "string2" ) ( "string3" ) ( "hkosev" ) ( "string4" ) ( "voxcpw" ) ( "keisuke_m" ) ( "00bata" ) ( "string5" ) ( "SUPER_PC" ) ( "isgroupsrl" ) ( "tacky" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "ripple2017" ) ( "ianfogg42" ) ( "DavidLiJin" ) } } ORDER BY ASC( ?var3 )


Question: Which Wikidata items have the Twitter usernames: wikidata, CBSNews, Numerama, renault_fr, PBALille, BrestFr, mesosphere, or joelgombin?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?username WHERE {
  ?item wdt:P2002 ?username .
  VALUES ?username {
    "wikidata" "CBSNews" "Numerama" "renault_fr" "PBALille" "BrestFr" "mesosphere" "joelgombin"
  }
}

What entities in Wikidata are associated with the Twitter handles "wikidata", "CBSNews", "Numerama", "renault_fr", "PBALille", "BrestFr", "mesosphere", and "joelgombin"?

List the Wikidata items that use any of these Twitter accounts: wikidata, CBSNews, Numerama, renault_fr, PBALille, BrestFr, mesosphere, or joelgombin.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "Wikimedia" ) ( "string1" ) ( "atterres" ) ( "string2" ) ( "mySociety" ) ( "WikiBrest" ) ( "BrestFr" ) ( "string3" ) ( "hatonjan" ) ( "string4" ) ( "Maud177" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "UnGarage" ) ( "schinako" ) ( "string9" ) ( "string10" ) ( "PBALille" ) ( "Mnyo" ) ( "mesosphere" ) ( "string11" ) ( "string12" ) ( "JeromeGmb" ) ( "string13" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "Sharkyl" ) ( "string17" ) ( "hknightsf" ) ( "sl_lab" ) ( "string18" ) ( "wikidata" ) ( "MDARennes" ) ( "renault_fr" ) ( "CBSNews" ) ( "MaelLeHir" ) ( "OtakuSkum" ) ( "string19" ) ( "string20" ) ( "fa_oze" ) ( "Biblinsa" ) ( "string21" ) ( "Zidjinn" ) ( "Aranthell" ) ( "string22" ) ( "string23" ) ( "string24" ) ( "atbrest" ) ( "string25" ) ( "UnpeudR" ) ( "jenist" ) ( "Numerama" ) ( "string26" ) ( "joelgombin" ) ( "string27" ) ( "FNarolles" ) ( "OBergervdn" ) } } ORDER BY ASC( ?var3 )


Question: How many scholarly articles have a DOI?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ( COUNT( ?item ) AS ?count ) WHERE {
  ?item wdt:P31 wd:Q13442814 .
  ?item wdt:P356 ?doi .
}

What is the count of scholarly articles that are assigned a Digital Object Identifier (DOI)?

Please provide the total number of academic papers in Wikidata that have a DOI.

SELECT( COUNT ( ?var1 ) AS ?var2 ) WHERE { <http://www.wikidata.org/prop/direct/Q311655> ?var3 ?var1 . ?var1 ( <http://www.w3.org/ns/prov#wasDerivedFrom> / <http://www.wikidata.org/prop/reference/P248> / <http://www.wikidata.org/prop/direct/P356> ) ?var4 . }


Question: What are the Twitter usernames for Barack Obama and Elon Musk on Wikidata?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?entity ?username WHERE {
  ?entity wdt:P2002 ?username .
  VALUES ?username {
    "elonmusk" "BarackObama"
  }
}

Which entities on Wikidata have the Twitter handles "elonmusk" or "BarackObama"?

Show me the Wikidata entities associated with the Twitter accounts elonmusk and BarackObama.

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


Question: Which Twitter accounts (on X) are linked to Wikidata items, and how many Wikipedia sitelinks do they have, sorted by least to most?

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?twitterHandle(COUNT(?site) AS ?sitelinkCount) WHERE {
  ?item wdt:P2002 ?twitterHandle .
  ?site schema:about ?item .
  FILTER(STRSTARTS(STR(?site) , "https://"))
  VALUES ?twitterHandle {
    "afpfr" "lemondefr" "France2tv" "alainjuppe" "oravanello" "LesEchos"
  }
}
GROUP BY ?item ?twitterHandle
ORDER BY ASC(?sitelinkCount)

What are the Twitter handles of Wikidata items like Agence France-Presse and Le Monde, and how many language versions of their Wikipedia pages exist for each?

List the Twitter usernames of major French media organizations and public figures on Wikidata, along with the number of Wikipedia sites they appear on, ordered from the least to the most popular.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "oravanello" ) ( "string1" ) ( "string2" ) ( "alainjuppe" ) ( "LesEchos" ) ( "string3" ) ( "string4" ) ( "string5" ) ( "string6" ) ( "afpfr" ) ( "cb_news" ) ( "string7" ) ( "France2tv" ) ( "string8" ) ( "arnopons" ) ( "string9" ) ( "MagnetoTV" ) ( "string10" ) ( "string11" ) ( "string12" ) ( "string13" ) ( "lemondefr" ) ( "string14" ) ( "string15" ) ( "string16" ) ( "string17" ) } } ORDER BY ASC( ?var3 )


Question: What are the Twitter usernames for NASA, BBC News, El País, and the University of Oviedo?

SELECT ?item ?twitterUsername WHERE { ?item wdt:P2002 ?twitterUsername . VALUES ?twitterUsername { "uniovi_info" "NASA" "BBCNews" "el_pais" } OPTIONAL { ?item rdfs:label ?label . FILTER(LANG(?label) = "en") } }

Can you show me which Wikidata items have the Twitter handles 'NASA', 'BBCNews', 'el_pais', or 'uniovi_info'?

Which organizations on Wikidata are associated with these Twitter accounts: @NASA, @BBCNews, @el_pais, and @uniovi_info?

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "string1" ) ( "string2" ) ( "string3" ) ( "string4" ) ( "cmgarzacom" ) ( "gipUniovi" ) ( "Three_Ten" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "samymohab" ) ( "mcchaz_" ) ( "string8" ) ( "string9" ) ( "emcgettie" ) ( "string10" ) ( "astawismar" ) } }


Question: Average film duration by director and country of origin

SELECT ?director ?country (AVG(?duration) AS ?avgDuration) WHERE { ?film wdt:P31 wd:Q11424 . ?film wdt:P2047 ?duration . ?film wdt:P57 ?director . ?director wdt:P31 wd:Q5 . ?film wdt:P495 ?country . ?country wdt:P31 wd:Q6256 . } GROUP BY ?director ?country

What is the average duration of films directed by each person, grouped by their country of origin?

Show me the average length of films for each director and the country they are associated with.

SELECT( ?var1 AS ?var2 )( ?var3 AS ?var4 )( AVG ( ?var5 ) AS ?var6 ) WHERE { ?var7 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var7 <http://www.wikidata.org/prop/direct/P2047> ?var5 . ?var7 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var7 <http://www.wikidata.org/prop/direct/P57> ?var1 . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var7 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . ?var7 <http://www.wikidata.org/prop/direct/P495> ?var3 . ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q6256> . } GROUP BY ?var1 ?var3