Question: What are the direct subclasses and superclasses of an atom in Wikidata?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?entity ?entityLabel WHERE {
  VALUES ?start {
    wd:Q9121
  }
  {
    ?start wdt:P279 ?entity
  } UNION {
    ?start ^ wdt:P279 ?entity
  }
  OPTIONAL {
    ?entity rdfs:label ?entityLabel .
    FILTER ( LANG( ?entityLabel ) = "en" )
  }
}
ORDER BY ?entity

Can you list the types of atoms and broader scientific categories that include atoms?

What scientific concepts are immediately above and below the concept of an atom in the classification hierarchy?

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


Question: What chemical element has the symbol Ac?

SELECT ?element WHERE { ?element wdt:P246 "Ac" . }

Which element is represented by the symbol Ac?

Find the chemical element with the symbol Ac.

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1121> . }


Question: Authors who co-authored papers about the basal ganglia.

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 ?author1 ?author1Label ?author2 ?author2Label WHERE {
  {
    ?work ( wdt:P921 / wdt:P31 * / wdt:P279 * ) wd:Q464210 .
  } UNION {
    ?work ( wdt:P921 / wdt:P361 + ) wd:Q464210 .
  } UNION {
    ?work ( wdt:P921 / wdt:P1269 + ) wd:Q464210 .
  }
  ?work wdt:P50 ?author1 .
  ?work wdt:P50 ?author2 .
  FILTER ( ?author1 != ?author2 ) FILTER ( ?author1 < ?author2 ) ?author1 rdfs:label ?author1Label .
  ?author2 rdfs:label ?author2Label .
  FILTER ( lang( ?author1Label ) = "en" ) FILTER ( lang( ?author2Label ) = "en" )
}

Who are pairs of distinct authors that have written scientific works on the basal ganglia?

List all unique pairs of English-named authors who have co-authored works where the basal ganglia is the main subject, part, or aspect.

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


Question: Genre, release date, and performer of the song "Breakin' Dishes" by Rihanna.

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 ?work ?workLabel ?genre ?genreLabel ?date ?performer ?performerLabel WHERE {
  VALUES ?work {
    wd:Q903910
  }
  OPTIONAL {
    ?work wdt:P136 ?genre .
  }
  OPTIONAL {
    ?work wdt:P577 ?date .
  }
  OPTIONAL {
    ?work wdt:P175 ?performer .
  }
  OPTIONAL {
    ?work rdfs:label ?workLabel .
    FILTER ( LANG( ?workLabel ) = "en" )
  }
  OPTIONAL {
    ?genre rdfs:label ?genreLabel .
    FILTER ( LANG( ?genreLabel ) = "en" )
  }
  OPTIONAL {
    ?performer rdfs:label ?performerLabel .
    FILTER ( LANG( ?performerLabel ) = "en" )
  }
}

What is the genre, publication date, and performer of the song "Breakin' Dishes"?

Please provide the genre, release year, and artist of Rihanna's song "Breakin' Dishes".

SELECT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var4 ?var4Label WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q903910> ) } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P136> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P577> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P175> ?var4 . } } LIMIT 1


Question: List all chemical elements and their symbols.

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 ?element ?elementLabel ?symbol WHERE {
  ?element(wdt:P31 / wdt:P279 *) wd:Q11344 ; wdt:P246 ?symbol .
  ?element rdfs:label ?elementLabel .
  FILTER(LANG(?elementLabel) = "en")
}
LIMIT 10000

What are the names and chemical symbols of all chemical elements?

Show me the English names and element symbols (like Hg, Pb) for every known chemical element.

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/entity/Q11344> ; <http://www.wikidata.org/prop/direct/P246> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } LIMIT 10000


Question: List all chemical elements in alphabetical order.

SELECT DISTINCT ?elementLabel WHERE { ?element wdt:P31 wd:Q11344 . ?element rdfs:label ?elementLabel . FILTER(LANG(?elementLabel) = "en") } ORDER BY ASC(?elementLabel)

What are the names of all chemical elements, sorted alphabetically?

Show me the English names of all chemical elements, ordered from A to Z.

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


Question: What journal published the article "Current Zika virus epidemiology and recent epidemics"?

SELECT ?journal WHERE { wd:Q22330739 wdt:P1433 ?journal . } LIMIT 10000

Journal of the academic article "Current Zika virus epidemiology and recent epidemics".

Tell me the publication venue of the scholarly article on Zika virus epidemiology.

SELECT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P1433> <http://www.wikidata.org/entity/Q22330739> . } LIMIT 10000


Question: What are the durations of all music albums in Wikidata?

SELECT ?album ?duration WHERE { ?album wdt:P31 wd:Q482994 . ?album wdt:P2047 ?duration .}

Can you show me the names of all music albums along with how long each one is?

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q482994> . ?var1 <http://www.wikidata.org/prop/direct/P2047> ?var3 . }


Question: Swedish human settlements with coordinates

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?settlement ?label ?coordinates WHERE {
  ?settlement wdt:P31 wd:Q486972 ; wdt:P17 wd:Q34 ; wdt:P625 ?coordinates .
  ?settlement rdfs:label ?label .
  FILTER ( LANG( ?label ) = "sv" )
}

What are the names and geographic coordinates of human settlements in Sweden, using their Swedish labels?

List all towns and villages in Sweden along with their Swedish names and GPS coordinates.

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


Question: Subclasses of chemical elements

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 ?subclass ?subclassLabel WHERE {
  ?subclass wdt:P279 wd:Q11344 .
  ?subclass rdfs:label ?subclassLabel .
  FILTER(LANG(?subclassLabel) = "en")
}
LIMIT 11

What are some categories or types of chemical elements?

List up to 11 types of chemical elements, such as metals, metalloids, or nonmetals.

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


Question: Which gene and property does the statement s:Q14890475-2A2FCD06-B61E-4526-BBCE-2348A35991F8 refer to?

SELECT ?gene ?property WHERE { ?gene ?property s:Q14890475-2A2FCD06-B61E-4526-BBCE-2348A35991F8 . }

Show me the gene and property linked to the RefSeq RNA ID statement for the Apoe gene.

Gene and property for statement s:Q14890475-2A2FCD06-B61E-4526-BBCE-2348A35991F8

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q14890475-2A2FCD06-B61E-4526-BBCE-2348A35991F8> . }


Question: What class does Dipicolinic acid synthetase subunit A belong to?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?proteinFamily WHERE {
  wd:Q24779578 wdt:P31 ?proteinFamily .
}

Is Dipicolinic acid synthetase subunit A a protein or a protein family?

What is the type of the protein Dipicolinic acid synthetase subunit A?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q24779578-C4BCD54A-C8CB-4191-8DBD-04D6A7890314> . }


Question: Musical groups or bands with "school" in the name and their genres and descriptions

SELECT ?item ?label ?genre ?description WHERE { { ?item wdt:P31 wd:Q215380 . } UNION { ?item wdt:P31 wd:Q5741069 . } UNION { ?item wdt:P31 wd:Q9212979 . } ?item rdfs:label ?label . ?item schema:description ?description . ?item wdt:P136 ?genreItem . ?genreItem rdfs:label ?genre . FILTER (LANG(?description) = "en") FILTER (LANG(?genre) = "en") FILTER (CONTAINS(LCASE(?label), "school")) } LIMIT 1

What are some musical groups, rock bands, or duos that have "school" in their name, and what are their genres and descriptions?

Show me a musical group, rock band, or duo with "school" in its label, along with its English genre and description.

SELECT ?var1 ?var2 ?var3 ?var4 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q215380> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . ?var1 <http://schema.org/description> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P136> ?var5 . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . FILTER ( ( ( LANG ( ?var4 ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . FILTER ( ( CONTAINS ( LCASE ( ?var2 ) , "foo" ) ) ) . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5741069> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . ?var1 <http://schema.org/description> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P136> ?var5 . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . FILTER ( ( ( LANG ( ?var4 ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . FILTER ( ( CONTAINS ( LCASE ( ?var2 ) , "foo" ) ) ) . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q19184926> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . ?var1 <http://schema.org/description> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P136> ?var5 . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . FILTER ( ( ( LANG ( ?var4 ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . FILTER ( ( CONTAINS ( LCASE ( ?var2 ) , "foo" ) ) ) . } } LIMIT 1


Question: Images of music albums from Wikidata

SELECT ?image WHERE { ?album wdt:P31 wd:Q482994 . ?album wdt:P18 ?image . } LIMIT 88

What are the images of music albums stored in Wikidata?

Show me up to 88 images of music albums from Wikidata.

SELECT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1333350> . ?var2 <http://www.wikidata.org/prop/direct/P18> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( ?var3 ) LIMIT 88


Question: What are the classification systems for musical instruments and their English labels?

SELECT ?classification ?label ?image WHERE { ?classification wdt:P31 wd:Q2748242 . OPTIONAL { ?classification wdt:P18 ?image . } ?classification rdfs:label ?label . FILTER(LANG(?label) = "en") } LIMIT 100

Can you list the known classification systems for musical instruments along with their English names?

Show me the English names of all musical instrument classification systems, and if available, their associated images.

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


Question: Authors of academic papers about Greece with multiple contributors

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 ?author1 ?author1Label ?author2 ?author2Label WHERE {
  ?work wdt:P921 wd:Q41 .
  ?work wdt:P50 ?author1 .
  ?work wdt:P50 ?author2 .
  FILTER(?author1 != ?author2)
  .
  ?author1 rdfs:label ?author1Label .
  ?author2 rdfs:label ?author2Label .
  FILTER(LANG(?author1Label) = "en")
  .
  FILTER(LANG(?author2Label) = "en")
}
LIMIT 10

Which pairs of different authors have co-authored works about Greece?

List all pairs of distinct authors who have written papers on Greece.

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


Question: List 10 music albums from Wikidata.

SELECT DISTINCT ?album WHERE { ?album wdt:P31 wd:Q482994 . } LIMIT 10

What are some examples of music albums in Wikidata?

Can you show me 10 items that are classified as music albums?

SELECT DISTINCT ?var1 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q482994> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var2 . } } LIMIT 10


Question: What properties (excluding 'instance of') are used to link entities to the concept of design?

SELECT DISTINCT ?property WHERE { ?item ?statementProperty wd:Q82604 . ?property wikibase:statementProperty ?statementProperty . FILTER (?property != wd:P31) }

Which properties, other than 'instance of', have design as a value in Wikidata?

Show me all the direct properties in Wikidata (except P31) that connect any entity to 'design' as a value, such as occupation or field of work.

SELECT DISTINCT ?var1 WHERE { ?var2 ?var3 <http://www.wikidata.org/entity/Q82604> . ?var1 <http://wikiba.se/ontology#statementProperty> ?var3 . FILTER ( ( ( ?var1 != <http://www.wikidata.org/entity/P31> ) ) ) . }


Question: What are the geographic coordinates of Hoover Dam Lodge?

PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?label ?coordinates WHERE {
  <https://en.wikipedia.org/wiki/Hoover_Dam_Lodge> schema:about ?item .
  ?item wdt:P625 ?coordinates .
  ?item rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}

Can you tell me the name and location coordinates of the Hoover Dam Lodge as listed on Wikidata?

Where is Hoover Dam Lodge located? Provide its name and GPS coordinates from Wikidata.

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { <https://en.wikipedia.org/wiki/Hoover_Dam_Lodge> <http://schema.org/about> ?var1 . ?var1 <http://www.wikidata.org/prop/direct/P17> ?var4 . ?var1 <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". } }


Question: Chemical elements ordered by atomic number with their discoverers

SELECT ?element ( GROUP_CONCAT( ?discovererLabel ; SEPARATOR = "^^" ) AS ?discoverers ) WHERE { ?element wdt:P31 wd:Q11344 . ?element wdt:P1086 ?atomicNumber . ?element wdt:P61 ?discoverer . OPTIONAL { ?discoverer rdfs:label ?discovererLabel . FILTER(LANG(?discovererLabel) = "en") } } GROUP BY ?element ORDER BY ASC ( ?atomicNumber )

Which chemical elements have been discovered, and who discovered them, listed in order of atomic number?

List all chemical elements along with their discoverers, sorted by atomic number, showing discoverers as a concatenated string separated by "^^".

SELECT ?var1 ( GROUP_CONCAT ( ?var2 ; SEPARATOR = "^^" ) AS ?var3 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11344> . ?var1 <http://www.wikidata.org/prop/direct/P1086> ?var4 . ?var1 <http://www.wikidata.org/prop/direct/P61> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ORDER BY ASC( ?var4 )


Question: Authors who co-authored papers related to Sci-Hub.

SELECT ?author1 ?author1Label ?author2 ?author2Label WHERE { { ?work (wdt:P921/wdt:P31*/wdt:P279*) wd:Q21980377 . } UNION { ?work (wdt:P921/wdt:P361+) wd:Q21980377 . } UNION { ?work (wdt:P921/wdt:P1269+) wd:Q21980377 . } ?work wdt:P50 ?author1 . ?work wdt:P50 ?author2 . FILTER (?author1 < ?author2) ?author1 rdfs:label ?author1Label . ?author2 rdfs:label ?author2Label . FILTER(LANG(?author1Label) = "en" && LANG(?author2Label) = "en") }

Which pairs of authors have written papers that have Sci-Hub as a main subject, part, or facet?

List all unique pairs of co-authors of works connected to Sci-Hub, including their names in English.

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


Question: What are the English and German Wikipedia pages for the film with IMDb ID tt0256103?

SELECT ?film ?wikipedia_page WHERE { ?film wdt:P345 "tt0256103" . ?wikipedia_page schema:about ?film . ?wikipedia_page schema:inLanguage ?lang . VALUES ?lang { "en" "de" } }

Show me the Wikipedia articles about the movie "Intimacy" in English and German.

Which language versions of Wikipedia have articles about the film identified by IMDb ID tt0256103?

SELECT ?var1 ?var2 ?var3 WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P345> "tt0256103". } ?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 are the chemical identifiers and alternative names for the drug bisacodyl?

SELECT ?drug ?drugLabel ?property ?value ?valueLabel WHERE { VALUES ?drug { wd:Q417874 } VALUES ?property { wdt:P274 wdt:P231 wdt:P232 wdt:P233 wdt:P234 wdt:P235 wdt:P662 wdt:P661 wdt:P683 wdt:P715 wdt:P592 wdt:P652 wdt:P486 wdt:P2275 wdt:P3345 wdt:P2892 wdt:P267 skos:altLabel } ?drug ?property ?value . OPTIONAL { ?value rdfs:label ?valueLabel FILTER(LANG(?valueLabel) = "en") } ?drug rdfs:label ?drugLabel FILTER(LANG(?drugLabel) = "en") }

Can you list all known database IDs (like PubChem, DrugBank, CAS) and alternative names for bisacodyl?

I need all the biomedical identifiers and synonyms for bisacodyl — including its chemical formula, WHO INN, MeSH ID, and alternative language names.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var3Label WHERE { VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q417874> ) } VALUES ( ?var2 ) { ( <http://www.wikidata.org/prop/direct/P274> ) ( <http://www.wikidata.org/prop/direct/P231> ) ( <http://www.wikidata.org/prop/direct/P662> ) ( <http://www.wikidata.org/prop/direct/P661> ) ( <http://www.wikidata.org/prop/direct/P592> ) ( <http://www.wikidata.org/prop/direct/P715> ) ( <http://www.wikidata.org/prop/direct/P683> ) ( <http://www.wikidata.org/prop/direct/P665> ) ( <http://www.wikidata.org/prop/direct/P233> ) ( <http://www.wikidata.org/prop/direct/P2017> ) ( <http://www.wikidata.org/prop/direct/P234> ) ( <http://www.wikidata.org/prop/direct/P235> ) ( <http://www.wikidata.org/prop/direct/P652> ) ( <http://www.wikidata.org/prop/direct/P595> ) ( <http://www.wikidata.org/prop/direct/P3636> ) ( <http://www.wikidata.org/prop/direct/P232> ) ( <http://www.wikidata.org/prop/direct/P2275> ) ( <http://www.wikidata.org/prop/direct/P3350> ) ( <http://www.wikidata.org/prop/direct/P267> ) ( <http://www.wikidata.org/prop/direct/P2892> ) ( <http://www.wikidata.org/prop/direct/P3345> ) ( <http://www.wikidata.org/prop/direct/P486> ) ( <http://www.wikidata.org/prop/direct/P2115> ) ( <http://www.wikidata.org/prop/direct/P3780> ) ( <http://www.wikidata.org/prop/direct/P3776> ) ( <http://www.wikidata.org/prop/direct/P3777> ) ( <http://www.wikidata.org/prop/direct/P3771> ) ( <http://www.wikidata.org/prop/direct/P129> ) ( <http://www.wikidata.org/prop/direct/P3489> ) ( <http://www.wikidata.org/prop/direct/P2868> ) ( <http://www.wikidata.org/prop/direct/P2175> ) ( <http://www.w3.org/2004/02/skos/core#altLabel> ) } OPTIONAL { ?var1 ?var2 ?var3 . FILTER ( ( isIRI ( ?var3 ) || ( LANG ( ?var3 ) = "en" ) || ( LANG ( ?var3 ) = "" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } }


Question: How many scholarly articles have cited "The Concise Guide to PHARMACOLOGY 2015/16: Overview" each year, starting from the most recent?

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

Show the yearly count of publications that reference the 2015/16 PHARMACOLOGY guide, ordered from latest to earliest year.

Over the years, how has the citation count for "The Concise Guide to PHARMACOLOGY 2015/16: Overview" grown? List the number of citations per year in descending order.

SELECT ?var1 ( COUNT ( DISTINCT ?var2 ) AS ?var3 ) ?var4 WHERE { BIND ( <http://www.wikidata.org/entity/Q30488640> 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: Television series starring Tim Allen, sorted by number of seasons

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 ?series ?seriesLabel ?seasons WHERE {
  ?actor wdt:P646 "/m/019vgs" .
  ?series wdt:P31 wd:Q5398426 .
  ?series wdt:P161 ?actor .
  ?series wdt:P2437 ?seasons .
  ?series rdfs:label ?seriesLabel .
  FILTER(LANG(?seriesLabel) = "en")
}
ORDER BY DESC(?seasons)
LIMIT 100

Which TV shows has Tim Allen starred in, and how many seasons did each have, ordered from most to least seasons?

List the TV series featuring Tim Allen, along with their number of seasons, sorted in descending order by season count.

SELECT ?var1 ?var1Label WHERE { ?var2 <http://www.wikidata.org/prop/direct/P646> "/m/019vgs". ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5398426> . ?var1 <http://www.wikidata.org/prop/direct/P161> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P2437> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY DESC( ?var3 ) LIMIT 100


Question: List 10 biological pathways.

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 ?pathway ?pathwayLabel WHERE {
  ?pathway wdt:P31 wd:Q4915012 .
  ?pathway rdfs:label ?pathwayLabel .
  FILTER(LANG(?pathwayLabel) = "en")
}
LIMIT 10

What are some examples of biological pathways in Wikidata?

Can you show me 10 named biological pathways with their English labels?

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


Question: Television series seasons whose English labels are formatted as "Series Name, season X" along with the series name and season number.

SELECT ?season ?seasonLabel ?series ?seriesLabel ?seasonNumber WHERE { ?season wdt:P31 wd:Q3464665 ; p:P179 [ ps:P179 ?series ; pq:P1545 ?seasonNumber ] . OPTIONAL { ?season rdfs:label ?seasonLabel . FILTER(LANG(?seasonLabel) = "en") } ?series wdt:P31 wd:Q5398426 ; rdfs:label ?seriesLabel . FILTER(LANG(?seriesLabel) = "en") FILTER(CONCAT(STR(?seriesLabel), ", season ", ?seasonNumber) = STR(?seasonLabel)) } LIMIT 10

Which television series seasons have English labels that exactly match the pattern "TV Series Name, season X", and what are the corresponding series names and season numbers?

Show me the television series seasons (with their season numbers) where the season’s English label is constructed by appending ", season X" to the TV series name.

SELECT ?var1 ?var2 ?var3 ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3464665> ; <http://www.wikidata.org/prop/P179> [ <http://www.wikidata.org/prop/statement/P179> ?var5 ; <http://www.wikidata.org/prop/qualifier/P1545> ?var4 ] . OPTIONAL { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . } ?var5 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5398426> . ?var5 <http://www.w3.org/2000/01/rdf-schema#label> ?var3 . FILTER ( ( ( LANG ( ?var3 ) = "en" ) ) ) . FILTER ( ( ( CONCAT ( STR ( ?var3 ) , ", season ", ?var4 ) = STR ( ?var2 ) ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } LIMIT 10


Question: What properties and values are associated with pulmonary artery choriocarcinoma?

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

Can you list all the information available about the disease pulmonary artery choriocarcinoma in Wikidata?

Which facts are known about pulmonary artery choriocarcinoma in Wikidata?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q18556859-1A5EB95E-9D45-429C-AD24-BB5A6F14A832> . }


Question: Spanish labels of properties and linked entities for liposarcoma, with counts

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?property ( SAMPLE( ?pl ) AS ?propertyLabel ) ( COUNT( ?object ) AS ?objectCount ) ( GROUP_CONCAT( ?objectLabel ; SEPARATOR = ", " ) AS ?objectLabels ) WHERE {
  wd:Q1827425 ?property ?object .
  ?object rdfs:label ?objectLabel .
  FILTER ( LANG( ?objectLabel ) = "es" ) .
  ?propertyItem wikibase:directClaim ?property .
  ?propertyItem rdfs:label ?pl .
  FILTER ( LANG( ?pl ) = "es" ) .
}
GROUP BY ?property

What are the Spanish labels of properties used by liposarcoma, how many entities do they link to, and what are those entities in Spanish?

Show me for each property connected to liposarcoma: its Spanish name, how many things it connects to, and the Spanish names of those things.

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


Question: List TV and radio broadcasters and their countries.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?broadcaster ?broadcasterLabel ?country ?countryLabel WHERE {
  ?mediaItem wdt:P3301 ?broadcaster .
  ?broadcaster wdt:P31 ?type .
  VALUES ?type {
    wd:Q1616075 wd:Q795585 wd:Q1164334 wd:Q680634 wd:Q11223354 wd:Q1549591
  }
  ?broadcaster rdfs:label ?broadcasterLabel .
  FILTER ( LANG( ?broadcasterLabel ) = "en" ) OPTIONAL {
    ?broadcaster wdt:P17 ?country .
    ?country rdfs:label ?countryLabel .
    FILTER ( LANG( ?countryLabel ) = "en" )
  }
}

Which countries host television and radio stations that broadcast media content?

Please provide a list of broadcasters (TV/radio stations) along with the countries they are based in.

SELECT ?var1 ?var1Label ?var2 ?var2Label WHERE { ?var3 <http://www.wikidata.org/prop/direct/P3301> ?var1 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P17> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "fr". } }


Question: Drugs containing tenofovir in their name

SELECT DISTINCT ?drug ?label (STRAFTER(STR(?drug), "http://www.wikidata.org/entity/") AS ?qid) WHERE { ?drug (wdt:P31/wdt:P279*) wd:Q8386 . ?drug rdfs:label ?label . FILTER(LANG(?label) = "en") FILTER(CONTAINS(LCASE(?label), "tenofovir")) } LIMIT 15

What are the English names of drugs that include tenofovir as an ingredient?

List the Wikidata items and labels for drugs that have "tenofovir" in their English name.

SELECT DISTINCT ?var1 ?var2 ( REPLACE ( STR ( ?var1 ) , ".*Q", "Q" ) AS ?var3 ) WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q8386> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . FILTER ( ( STRSTARTS ( LCASE ( ?var2 ) , LCASE ( "tenofo" ) ) ) ) . } LIMIT 15


Question: Chemical elements with their symbols and atomic numbers, ordered by atomic number.

SELECT ?element ?elementLabel ?symbol ?atomicNumber WHERE { ?element wdt:P31 wd:Q11344 . ?element wdt:P246 ?symbol . ?element wdt:P1086 ?atomicNumber . ?element rdfs:label ?elementLabel . FILTER(LANG(?elementLabel) = "en") } ORDER BY ASC(?atomicNumber)

What are the chemical elements, their symbols, and atomic numbers, sorted from lowest to highest atomic number?

List all chemical elements in order of increasing atomic number, along with their English names and chemical symbols.

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


Question: List chemical elements with their atomic masses in daltons, ordered by atomic number.

SELECT ?elementLabel ?massValue ?massUnit ?massUnitLabel WHERE { ?element wdt:P31 wd:Q11344 . ?element wdt:P1086 ?atomicNumber . ?element p:P2067 ?massStatement . ?massStatement psv:P2067 ?massValueNode . ?massValueNode wikibase:quantityAmount ?massValue . ?massValueNode wikibase:quantityUnit ?massUnit . ?element rdfs:label ?elementLabel . ?massUnit rdfs:label ?massUnitLabel . FILTER(LANG(?elementLabel) = "en") FILTER(LANG(?massUnitLabel) = "en") } ORDER BY ASC(?atomicNumber)

What are the atomic masses of all chemical elements, and what unit are they measured in?

Show me the names of chemical elements along with their atomic weights in daltons, sorted from hydrogen to the heaviest element.

SELECT ?var1Label ?var2 ?var3 ?var3Label ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11344> . ?var1 <http://www.wikidata.org/prop/direct/P1086> ?var5 . ?var1 ( <http://www.wikidata.org/prop/P2067> / <http://www.wikidata.org/prop/statement/value/P2067> ) ?var6 . ?var6 <http://wikiba.se/ontology#quantityAmount> ?var2 . ?var6 <http://wikiba.se/ontology#quantityUnit> ?var3 . OPTIONAL { ?var6 <http://wikiba.se/ontology#quantityReferenceRecord> ?var4 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( ?var5 )


Question: Films with box office earnings and their English titles

SELECT ?item ?itemLabel WHERE { ?item wdt:P2142 ?value . OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") } } LIMIT 11

What are 11 movies that have recorded box office earnings, and what are their English names?

List up to 11 items with box office data and their English labels.

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


Question: What are all the superclass categories of protein-coding gene in Wikidata?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?superclass WHERE {
  wd:Q20747295 wdt:P279 * ?superclass .
}
LIMIT 100

What classes does the protein-coding gene belong to through the subclass-of hierarchy?

List all the higher-level categories that protein-coding gene is a subclass of, including indirect ones.

SELECT DISTINCT ?var1 WHERE { BIND ( <http://www.wikidata.org/entity/Q20747295> AS ?var2 ). ?var2 <http://www.wikidata.org/prop/direct/P279> * ?var1 . }


Question: List all chemical elements with their atomic numbers in ascending order.

SELECT ?element ?elementLabel ?atomicNumber WHERE { ?element wdt:P31 wd:Q11344 . ?element wdt:P1086 ?atomicNumber . ?element rdfs:label ?elementLabel . FILTER(LANG(?elementLabel) = "en") } ORDER BY ASC(?atomicNumber)

What are the chemical elements and their corresponding atomic numbers, sorted from lowest to highest?

Show me the names of all chemical elements along with their atomic numbers, ordered by atomic number, using English labels.

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


Question: What is the instance of classification for ovarian fetiform teratoma?

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 ?subject ?propertyLabel WHERE {
  ?subject wdt:P31 ?object .
  FILTER(?subject = wd:Q18557215)
  .
  wd:P31 rdfs:label ?propertyLabel .
  FILTER(LANG(?propertyLabel) = "en")
}

What property describes the category of ovarian fetiform teratoma in Wikidata?

Show me the subject and property label for the statement that classifies ovarian fetiform teratoma as a disease.

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q18557215-D2637ABC-4A1E-4AD0-842B-9293BCC6C593> . }


Question: What web pages or statements are about vulvar cancer?

SELECT ?item ?property WHERE {
  ?item ?property wd:Q1908194 .
}

Which resources link to the Wikidata item for vulvar cancer?

What are the external links and Wikidata statements associated with vulvar cancer?

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


Question: Drugs starting with 't' in English.

SELECT DISTINCT ?drug ?label WHERE { ?drug (wdt:P31/wdt:P279*) wd:Q8386 . ?drug rdfs:label ?label . FILTER(LANG(?label) = "en") FILTER(STRSTARTS(LCASE(?label), "t")) } LIMIT 15

What are the English names of drugs and drug subclasses that begin with the letter 't'?

List up to 15 drugs and their subclasses whose English labels start with 't'.

SELECT DISTINCT ?var1 ?var2 WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q8386> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "en" ) ) ) . FILTER ( ( STRSTARTS ( LCASE ( ?var2 ) , LCASE ( "t" ) ) ) ) . } LIMIT 15


Question: Top-grossing films with their cast members and box office earnings

SELECT ?film ?filmLabel ?castMember ?castMemberLabel ?boxOffice WHERE { ?film wdt:P31 wd:Q11424 ; wdt:P161 ?castMember ; wdt:P2142 ?boxOffice . FILTER(?boxOffice > 100000000 && ?boxOffice < 3000000000) . ?film rdfs:label ?filmLabel . ?castMember rdfs:label ?castMemberLabel . FILTER(LANG(?filmLabel) = "en") . FILTER(LANG(?castMemberLabel) = "en") } ORDER BY DESC(?boxOffice) LIMIT 10

Which are the highest-grossing films of all time, who starred in them, and how much did they earn at the box office?

List the top 10 highest-grossing films in English, along with their main cast members and box office revenue, excluding films with unrealistic earnings.

SELECT ?var1 ?var1Label ?var2 ?var2Label ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/P161> [ <http://www.wikidata.org/prop/statement/P161> ?var2 ] . ?var1 <http://www.wikidata.org/prop/direct/P2142> ?var3 . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . }


Question: What properties and values are associated with Childhood choriocarcinoma of the ovary?

SELECT ?property ?value WHERE { wd:Q18557907 ?property ?value .}

Can you list all the information available for Childhood choriocarcinoma of the ovary in Wikidata?

What does Wikidata know about Childhood choriocarcinoma of the ovary, including descriptions and identifiers?

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


Question: What pairs of research topics commonly appear together in works related to proteochemometrics?

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 ?topic1 ?topic1Label ?topic2 ?topic2Label WHERE {
  {
    ?work ( wdt:P921 / wdt:P31 * / wdt:P279 * ) wd:Q50327360 .
  } UNION {
    ?work ( wdt:P921 / wdt:P361 + ) wd:Q50327360 .
  } UNION {
    ?work ( wdt:P921 / wdt:P1269 + ) wd:Q50327360 .
  }
  ?work wdt:P921 ?topic1 , ?topic2 .
  FILTER ( ?topic1 != wd:Q50327360 && ?topic2 != wd:Q50327360 && ?topic1 != ?topic2 ) OPTIONAL {
    ?topic1 rdfs:label ?topic1Label .
    FILTER ( LANG( ?topic1Label ) = "en" )
  }
  OPTIONAL {
    ?topic2 rdfs:label ?topic2Label .
    FILTER ( LANG( ?topic2Label ) = "en" )
  }
}

Which pairs of main subjects (e.g., biological entities, methods, or concepts) are jointly associated with the same publications or datasets that are about proteochemometrics, excluding proteochemometrics itself?

Show me the most frequent co-occurring topics in scientific works where proteochemometrics is a related field, such as through subclass, part, or facet relationships.

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


Question: TV episodes without IMDb IDs that are part of a series

SELECT ?episode ?episodeLabel WHERE { ?episode wdt:P31 wd:Q21191270 ; wdt:P179 ?series . FILTER NOT EXISTS { ?episode wdt:P345 ?imdb . } ?episode rdfs:label ?episodeLabel . FILTER(LANG(?episodeLabel) = "en") } LIMIT 20

Which television episodes are part of a series but do not have an IMDb identifier?

Show me TV episodes that belong to a series but are not linked to IMDb.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P179> <http://www.wikidata.org/entity/Q871858> . FILTER ( ( NOT EXISTS { ?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> "de". } } LIMIT 20


Question: List all drugs and their subclasses in Wikidata.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item WHERE {
  ?item wdt:P31 / wdt:P279 * wd:Q8386 .
}

What are all the entities that are classified as drugs or any of their subtypes?

Show me all known drugs, including more specific types of drugs, from Wikidata.

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


Question: What are the categories that Hollywood and Punta Islita Airport belong to?

SELECT ?class1 ?class2 WHERE { wd:Q34006 wdt:P31 ?class1 . wd:Q3545312 wdt:P31 ?class2 . }

Do Hollywood and Punta Islita Airport share any common classification in Wikidata?

What is the most specific shared superclass between the neighborhood of Hollywood and the airport in 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/Q3545312> ; <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/Q34006> ; <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 names of music albums, their performers, and release dates?

SELECT ?album ?albumLabel ?performer ?performerLabel ?releaseDate WHERE { ?album wdt:P31 wd:Q482994 . OPTIONAL { ?album wdt:P175 ?performer . } OPTIONAL { ?album wdt:P577 ?releaseDate . } OPTIONAL { ?album rdfs:label ?albumLabel . FILTER(LANG(?albumLabel) = "en") } OPTIONAL { ?performer rdfs:label ?performerLabel . FILTER(LANG(?performerLabel) = "en") } } LIMIT 100

Show me a list of albums along with the artists who performed them and when they were released.

Can you list music albums with their performing artists and publication years?

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


Question: What protein is the ANTAR domain part of, according to the statement with reference ref:85024ad19d5a0f2fb12d25aa9471fa23d3f6bb19?

SELECT ?property ?value ?valueLabel ?reference WHERE { s:Q24768333-F62E6210-3C2C-4C2A-8943-D7837ED33AFE ps:P361 ?value . s:Q24768333-F62E6210-3C2C-4C2A-8943-D7837ED33AFE prov:wasDerivedFrom ?reference . BIND(wdt:P361 AS ?property) . ?value rdfs:label ?valueLabel . FILTER(LANG(?valueLabel) = "en") }

According to which reference is the ANTAR domain stated to be part of the GAF-ANTAR transcription anti-termination regulator, putative?

Show the claim and source for the statement that the ANTAR domain is part of the GAF-ANTAR transcription anti-termination regulator, putative.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/statement/Q24768333-F62E6210-3C2C-4C2A-8943-D7837ED33AFE> ?var1 ?var2 . }


Question: What albums were released by the band Braid, and when were they released?

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 ?album ?albumLabel ?releaseDate WHERE {
  ?album wdt:P175 wd:Q4955640 .
  ?album wdt:P31 wd:Q482994 .
  OPTIONAL {
    ?album wdt:P577 ?releaseDate .
  }
  ?album rdfs:label ?albumLabel .
  FILTER(LANG(?albumLabel) = "en")
}
LIMIT 300

List Braid's albums and their release dates.

Can you show me the albums by the band Braid along with their publication dates?

SELECT ?var1 ?var1Label ?var2 ?var2Label ?var3 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } ?var1 <http://www.wikidata.org/prop/direct/P175> <http://www.wikidata.org/entity/Q4955640> . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q482994> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P31> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P577> ?var3 . } } LIMIT 300


Question: List current Swedish municipalities with their administrative counties and geographic coordinates.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?municipality(GROUP_CONCAT(DISTINCT ?municipalityLabel ; SEPARATOR = "; ") AS ?municipalityName)(GROUP_CONCAT(DISTINCT ?administrativeRegionLabel ; SEPARATOR = " / ") AS ?administrativeRegionName)(SAMPLE(?coordinate) AS ?location) WHERE {
  ?municipality wdt:P31 wd:Q127448 .
  ?municipality p:P131 ?statement .
  ?statement ps:P131 ?administrativeRegion .
  ?municipality wdt:P625 ?coordinate .
  FILTER(NOT EXISTS {
    ?statement pq:P582 ?endTime
  })
  .
  ?municipality rdfs:label ?municipalityLabel .
  FILTER(LANG(?municipalityLabel) = "en")
  .
  ?administrativeRegion rdfs:label ?administrativeRegionLabel .
  FILTER(LANG(?administrativeRegionLabel) = "en")
  .
}
GROUP BY ?municipality

What are the names, locations, and所属 counties of all currently active municipalities in Sweden?

Show me a list of Swedish municipalities that are still active, along with the county they belong to and their coordinates.

SELECT ?var1 ( GROUP_CONCAT ( DISTINCT ?var1Label ; SEPARATOR = "; " ) AS ?var1Label )( GROUP_CONCAT ( DISTINCT ?var2Label ; SEPARATOR = " / " ) AS ?var3 )( SAMPLE ( ?var4 ) AS ?var5 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q127448> . ?var1 <http://www.wikidata.org/prop/P131> ?var6 . ?var6 <http://www.wikidata.org/prop/statement/P131> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var4 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . } FILTER ( ( NOT EXISTS { ?var6 <http://www.wikidata.org/prop/qualifier/P582> ?var7 . } ) ) . } GROUP BY ?var1


Question: What entity and property does the statement with ID Q29971817-7AF881C2-17D8-4AD4-852E-6B125E28BAE7 refer to?

PREFIX s: <http://www.wikidata.org/entity/statement/>
SELECT ?subject ?predicate WHERE {
  ?subject ?predicate s:Q29971817-7AF881C2-17D8-4AD4-852E-6B125E28BAE7 .
}

Which subject and predicate are associated with the statement s:Q29971817-7AF881C2-17D8-4AD4-852E-6B125E28BAE7?

What is the claim made by the statement s:Q29971817-7AF881C2-17D8-4AD4-852E-6B125E28BAE7 — which entity and property does it involve?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q29971817-7AF881C2-17D8-4AD4-852E-6B125E28BAE7> . }


Question: Subclasses of pancreatic cancer and their direct parent classes.

SELECT ?subclass ?subclassLabel ?directParent WHERE { ?subclass wdt:P279* wd:Q212961 . OPTIONAL { ?subclass wdt:P279 ?directParent . } ?subclass rdfs:label ?subclassLabel . FILTER(LANG(?subclassLabel) = "en") }

What are all the types of pancreatic cancer and what disease category does each one directly belong to?

List all diseases classified under pancreatic cancer, along with their immediate parent classifications in the disease hierarchy.

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


Question: Drugs and their WHO international non-proprietary names in English

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?drug ?drugLabel ?inn WHERE {
  ?drug wdt:P2275 ?inn .
  ?drug rdfs:label ?drugLabel .
  FILTER(LANG(?drugLabel) = "en" && LANG(?inn) = "en")
}
LIMIT 12

What are the English names of drugs and their corresponding WHO international non-proprietary names?

List up to 12 drugs with their official English labels and their WHO INNs in English.

SELECT ?var1 ?var1Label ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2275> ?var2 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( ( LANG ( ?var2 ) = "mo" ) ) ) . } LIMIT 12


Question: What countries is the TV series 'The Crown' from?

SELECT ?var1Label ?var2 ?var2Label WHERE { ?var1 rdfs:label ?var1Label ; wdt:P31 wd:Q5398426 . FILTER(lang(?var1Label) = "en" && STR(?var1Label) = "The Crown") OPTIONAL { ?var1 wdt:P495 ?var2 . ?var2 rdfs:label ?var2Label . FILTER(lang(?var2Label) = "en") } }

Which countries are the origin of the television series 'The Crown'?

Show me the countries of origin for the TV show 'The Crown' in English.

SELECT ?var1Label ?var2 ?var2Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5398426> ; <http://www.w3.org/2000/01/rdf-schema#label> "The Crown"@en . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P495> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P297> ?var3 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: How many Wikimedia categories have "health problem" as their main topic?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ( COUNT( ?category ) AS ?count ) WHERE {
  ?category wdt:P301 wd:Q2057971 .
}

What is the number of Wikipedia categories focused on health problems?

Is there only one Wikipedia category that centers on the topic of health problems?

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


Question: List radio stations and their Facebook usernames.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?station ?stationLabel ?facebookUsername WHERE {
  ?station wdt:P31 wd:Q14350 .
  OPTIONAL {
    ?station wdt:P2013 ?facebookUsername .
  }
  ?station rdfs:label ?stationLabel .
  FILTER ( LANG( ?stationLabel ) = 'en' )
}
LIMIT 1000

Which radio stations have Facebook profiles, and what are their usernames?

Show me the names of radio stations along with their Facebook usernames, if available.

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


Question: Books and their authors

SELECT ?book ?bookLabel ?author ?authorLabel WHERE { ?book wdt:P31 wd:Q571 . ?author wdt:P50 ?book . FILTER (?book != ?author) OPTIONAL { ?book rdfs:label ?bookLabel . FILTER(LANG(?bookLabel) = "en") } OPTIONAL { ?author rdfs:label ?authorLabel . FILTER(LANG(?authorLabel) = "en") } } ORDER BY ?bookLabel

Which books have been written by which authors?

List the English-labeled books and their authors, excluding cases where a book is incorrectly linked to itself as an author.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q571> . ?var2 <http://www.wikidata.org/prop/direct/P50> ?var1 . }


Question: Swedish minor urban area codes excluding those with coordinates from Småorter 2015 report.

PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?code WHERE {
  ?urbanArea wdt:P776 ?code . MINUS {
    ?urbanArea p:P625 ?statement .
    ?statement prov:wasDerivedFrom ?reference .
    ?reference pr:P248 wd:Q28048805 .
  }
}
ORDER BY ASC(?code)

Which Swedish minor urban areas have coordinate data sourced from something other than the Småorter 2015 report?

Please list all Swedish minor urban area codes that are not referenced in the Småorter 2015 report.

SELECT ?var1 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P776> ?var1 . OPTIONAL { ?var2 <http://www.wikidata.org/prop/P625> ?var3 . ?var3 <http://www.wikidata.org/prop/statement/P625> ?var4 ; <http://www.w3.org/ns/prov#wasDerivedFrom> ?var5 . ?var5 <http://www.wikidata.org/prop/reference/P248> ?var6 . FILTER ( ( ( ?var6 != <http://www.wikidata.org/entity/Q28048805> ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv". } } ORDER BY ASC( ?var1 )


Question: How many television series episodes have additional type classifications beyond being a TV episode?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?hasOtherInstance ( COUNT( ?episode ) AS ?count ) WHERE {
  ?episode wdt:P31 wd:Q21191270 .
  OPTIONAL {
    ?episode wdt:P31 ?otherType .
    FILTER ( ?otherType != wd:Q21191270 )
  }
  BIND( IF( BOUND( ?otherType ) , "with" , "without" ) AS ?hasOtherInstance )
}
GROUP BY ?hasOtherInstance
ORDER BY ASC ( ?hasOtherInstance )

Are television series episodes typically classified only as episodes, or do they often belong to other categories too?

Show the count of television series episodes that are instances of other types besides "television series episode".

SELECT ?var1 ( COUNT ( ?var2 ) AS ?var3 ) WHERE { ?var2 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q21191270> . OPTIONAL { BIND ( "with" AS ?var4 ). ?var2 <http://www.wikidata.org/prop/direct/P31> [] . } BIND ( COALESCE ( ?var4 , "without" ) AS ?var1 ). } GROUP BY ?var1 ORDER BY ASC( ?var1 )


Question: What is the most general category that both Guanacaste Province and the Super Bowl belong to?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?ancestor WHERE {
  wd:Q690026 wdt:P31 ?type1 .
  wd:Q32096 wdt:P31 ?type2 .
  ?type1 wdt:P279 * ?ancestor .
  ?type2 wdt:P279 * ?ancestor .
}
ORDER BY ASC ( ?ancestor )
LIMIT 1

What is the highest-level shared class in Wikidata's hierarchy for Guanacaste Province and the Super Bowl?

What concept do Guanacaste Province and the Super Bowl have in common at the top of their classification trees?

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/Q690026> ; <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/Q32096> ; <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: Observation towers in Prague with coordinates and districts

SELECT ?tower ?coordinates ?district WHERE { ?tower wdt:P17 wd:Q213 . ?tower wdt:P625 ?coordinates . ?tower wdt:P31 wd:Q1440300 . ?tower wdt:P131 wd:Q1085 . ?tower wdt:P131 ?district . }

What are the observation towers in Prague, their coordinates, and the specific districts they are located in?

List all observation towers in Prague along with their geographic coordinates and the administrative districts they belong to.

SELECT ?var1 ?var2 ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q213> . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q1440300> . ?var1 <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q1085> . ?var1 <http://www.wikidata.org/prop/direct/P131> ?var3 . }


Question: What genes are orthologous to or encoded by the mouse Smn1 gene?

SELECT ?subject ?predicate WHERE { { ?subject wdt:P684 wd:Q18254186 . BIND(wdt:P684 AS ?predicate) } UNION { ?subject wdt:P702 wd:Q18254186 . BIND(wdt:P702 AS ?predicate) } }

Which human and mouse genes have a direct biological relationship with the mouse Smn1 gene?

Find all genes that are either orthologs of Smn1 or are encoded by it.

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


Question: What subject and predicate are associated with the statement s:Q88866-281A2847-F20C-4679-990D-CF17CFD18348?

PREFIX s: <http://www.wikidata.org/entity/statement/>
SELECT ?subject ?predicate WHERE {
  ?subject ?predicate s:Q88866-281A2847-F20C-4679-990D-CF17CFD18348 .
}

Which person and property does this Wikidata statement refer to?

Find the entity and property linked to this specific statement identifier.

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q5464657-44355E38-A46B-4051-AC86-70599C87AC12> . }


Question: What is the CAS number for monoammonium glutamate?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?cas WHERE {
  wd:Q8213959 wdt:P231 ?cas .
}

Can you find the chemical identifier (CAS number) of the compound monoammonium glutamate?

Show the CAS registry number for monoammonium glutamate.

SELECT ?var1 WHERE { <http://www.wikidata.org/entity/Q8213959> <http://www.wikidata.org/prop/direct/P402> ?var1 . }


Question: What is the most specific category that both an airport and a spaceport belong to?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonClass WHERE {
  wd:Q194188 wdt:P279 * ?commonClass .
  wd:Q1248784 wdt:P279 * ?commonClass .
  FILTER NOT EXISTS {
    ?otherCommonClass wdt:P279 + ?commonClass .
    wd:Q194188 wdt:P279 * ?otherCommonClass .
    wd:Q1248784 wdt:P279 * ?otherCommonClass .
  }
}
LIMIT 1

What do Kennedy Space Center and Punta Islita Airport have in common in terms of their classification?

What is the highest-level shared class that includes both airports and spaceports?

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/Q48821> ; <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/Q3545312> ; <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 species have the most biological entities annotated in WikiPathways, and how many?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?taxonLabel(COUNT(?entity) AS ?count) WHERE {
  ?entity wdt:P2410 ?pathway_id ; wdt:P703 ?taxon .
  ?taxon rdfs:label ?taxonLabel .
  FILTER(LANG(?taxonLabel) = "en")
}
GROUP BY ?taxon ?taxonLabel

How many WikiPathways-annotated entities are associated with each species, and which species top the list?

Show me the top species by count of entities linked to WikiPathways, along with their English labels and counts.

SELECT ?var1Label ( COUNT ( ?var1 ) AS ?var2 ) WHERE { ?var3 <http://www.wikidata.org/prop/direct/P2410> ?var4 ; <http://www.wikidata.org/prop/direct/P703> ?var1 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } } GROUP BY ?var1 ?var1Label


Question: Subclasses of molecular entity in chemistry

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 ?subclass ?subclassLabel WHERE {
  ?subclass wdt:P279 wd:Q2393187 .
  ?subclass rdfs:label ?subclassLabel .
  FILTER(LANG(?subclassLabel) = "en")
}
LIMIT 11

What are some chemical subclasses of a molecular entity?

List up to 11 English-labeled subclasses of molecular entity in Wikidata.

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


Question: What are all the pairs of topics that are commonly associated with data management in academic or technical works?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label WHERE {
  {
    SELECT DISTINCT ?topic1 ?topic1Label WHERE {
      {
        ?work wdt:P921 ?topic1 .
        ?topic1(wdt:P31 * / wdt:P279 *) wd:Q1149776 .
      } UNION {
        ?work wdt:P921 ?topic1 .
        ?topic1 wdt:P361 + wd:Q1149776 .
      } UNION {
        ?work wdt:P921 ?topic1 .
        ?topic1 wdt:P1269 + wd:Q1149776 .
      }
      ?topic1 rdfs:label ?topic1Label .
      FILTER(LANG(?topic1Label) = "en")
    }
  }
  {
    SELECT DISTINCT ?topic2 ?topic2Label WHERE {
      {
        ?work wdt:P921 ?topic2 .
        ?topic2(wdt:P31 * / wdt:P279 *) wd:Q1149776 .
      } UNION {
        ?work wdt:P921 ?topic2 .
        ?topic2 wdt:P361 + wd:Q1149776 .
      } UNION {
        ?work wdt:P921 ?topic2 .
        ?topic2 wdt:P1269 + wd:Q1149776 .
      }
      ?topic2 rdfs:label ?topic2Label .
      FILTER(LANG(?topic2Label) = "en")
    }
  }
  BIND(?topic1 AS ?var1)
  BIND(?topic2 AS ?var2)
  FILTER(?var1 != ?var2)
  ?var1 rdfs:label ?var1Label .
  ?var2 rdfs:label ?var2Label .
  FILTER(LANG(?var1Label) = "en" && LANG(?var2Label) = "en")
}
LIMIT 100

Which topics frequently appear alongside each other as main subjects in publications related to data management?

Can you list distinct topic pairs that are both linked to data management through their association with related works?

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


Question: What is the most specific administrative region that both Punta Islita Airport and Guanacaste Airport are located in?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?common ?commonLabel WHERE {
  wd:Q3545312 wdt:P131 * ?common .
  wd:Q1708765 wdt:P131 * ?common .
  ?common rdfs:label ?commonLabel .
  FILTER(LANG(?commonLabel) = 'en')
  {
    SELECT ?common(COUNT(?mid) AS ?depth) WHERE {
      wd:Q3545312 wdt:P131 * ?mid .
      ?mid wdt:P131 * ?common .
    }
    GROUP BY ?common
  }
}
ORDER BY ?depth
LIMIT 1

Which province contains both Punta Islita Airport and Guanacaste Airport?

Find the lowest-level geographic region shared by Punta Islita Airport and Guanacaste Airport in 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/Q43263422> ; <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/Q3545312> ; <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: Subclasses of cancer

SELECT ?cancerType ?cancerTypeLabel WHERE { ?cancerType wdt:P279* wd:Q12078 . ?cancerType rdfs:label ?cancerTypeLabel . FILTER(LANG(?cancerTypeLabel) = "en") }

List all known types of cancer as classified in Wikidata.

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


Question: What are the different editions and translations of the Iliad, and what are they called in various languages?

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 ?edition ?editionLabel WHERE {
  ?edition wdt:P629 wd:Q8275 .
  ?edition rdfs:label ?editionLabel .
}

List all known versions of Homer’s Iliad along with their names in different languages.

Show me the titles of all translations and editions of the Iliad in any language.

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


Question: WikiPathways pathways associated with humans

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

What are the WikiPathways identifiers for biological pathways found in Homo sapiens?

List all WikiPathways IDs for pathways that occur in humans.

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


Question: Archived URLs of open access policies for universities and research institutions.

PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?policy ?archivedUrl WHERE {
  ?policy wdt:P31 wd:Q2000006 .
  ?policy ( p:P953 / pq:P1065 ) ?archivedUrl .
}

What are the archived versions of the full text of open access policies from institutions like universities and CNRS?

Show me the archived web links where the full open access policies of institutions can be found.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q2000006> . ?var1 ( <http://www.wikidata.org/prop/P953> / <http://www.wikidata.org/prop/qualifier/P1065> ) ?var2 . }


Question: Which organizations and individuals have these Twitter/X usernames: AndrewYNg, BoozAllen, Etsy, GustoHQ, TechCrunch, and Veracode?

SELECT ?entity ?twitterUsername WHERE { ?entity wdt:P2002 ?twitterUsername . VALUES ?twitterUsername { "AndrewYNg" "BoozAllen" "Etsy" "GustoHQ" "TechCrunch" "Veracode" } }

Who are the Wikidata entities associated with the Twitter/X usernames AndrewYNg, BoozAllen, Etsy, GustoHQ, TechCrunch, and Veracode?

Show me the Wikidata entries for entities with the Twitter/X handles: AndrewYNg, BoozAllen, Etsy, GustoHQ, TechCrunch, and Veracode.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 . VALUES ( ?var2 ) { ( "UVADSI" ) ( "string1" ) ( "string2" ) ( "SAS_DACH" ) ( "nudro" ) ( "string3" ) ( "TechCrunch" ) ( "AndrewYNg" ) ( "Etsy" ) ( "kmkz202" ) ( "FranBerman" ) ( "resdatall" ) ( "Veracode" ) ( "string4" ) ( "GustoHQ" ) ( "BoozAllen" ) ( "string5" ) ( "string6" ) ( "SPGlobal" ) } }


Question: What chemical identifiers are associated with Netobimin?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?property ?propertyLabel ?identifier WHERE {
  wd:Q19297153 ?statementProperty ?identifier .
  ?property wikibase:directClaim ?statementProperty ; wdt:P31 wd:Q19833835 .
  ?property rdfs:label ?propertyLabel .
  FILTER(LANG(?propertyLabel) = "en")
}
ORDER BY ASC(?propertyLabel)
LIMIT 500

List the names and values of all chemical identifier properties (like CAS, ChEMBL, PubChem) for the compound Netobimin.

Which databases have recorded identifiers for Netobimin, and what are those identifiers?

SELECT ?var1 ?var1Label ?var2 WHERE { <http://www.wikidata.org/entity/Q19297153> ?var3 ?var2 . ?var1 <http://wikiba.se/ontology#directClaim> ?var3 ; <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q19833835> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,da,de,es,fr,jp,nl,no,ru,sv,zh". } } ORDER BY ASC( ?var1Label ) LIMIT 500


Question: Which fathers have had the most sons become popes, and what are images of those popes?

SELECT ?father ?fatherLabel (SAMPLE(?image) AS ?sampledImage) (COUNT(?pope) AS ?popeCount)
WHERE {
  ?pope wdt:P31 wd:Q5 ;
        wdt:P39 wd:Q19546 ;
        wdt:P22 ?father .
  OPTIONAL {
    ?pope wdt:P18 ?image .
  }
}
GROUP BY ?father ?fatherLabel
ORDER BY DESC(?popeCount)

Show the fathers of popes, how many popes each father had, and one image of a pope from each family.

Who are the most common fathers of popes in history, and can we see a picture of one of their papal sons?

SELECT ?var1 ?var1Label ( SAMPLE ( ?var2 ) AS ?var2 )( COUNT ( ?var3 ) AS ?var4 ) WHERE { ?var3 <http://www.wikidata.org/prop/direct/P22> ?var1 . ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> ; <http://www.wikidata.org/prop/direct/P39> <http://www.wikidata.org/entity/Q19546> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P18> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } GROUP BY ?var1 ?var1Label ORDER BY DESC( ?var4 )


Question: What Lego films have German-language labels?

SELECT ?film WHERE { ?film wdt:P31 wd:Q11424 . ?film rdfs:label ?label . FILTER(LANG(?label) = "de") . FILTER(CONTAINS(LCASE(?label), "lego")) }

Can you list the German-labeled movies related to Lego?

Show me all films associated with Lego that are labeled in German.

SELECT ?var1 WHERE { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> "Lego-film"@de . }


Question: What entity and property does the statement node s:Q24768234-21FD46F0-DC75-472C-A1C2-4C5683867575 represent?

SELECT ?entity ?property WHERE { ?entity ?property s:Q24768234-21FD46F0-DC75-472C-A1C2-4C5683867575 . }

Which entity has a claim about "instance of" with this specific statement identifier?

Given a Wikidata statement node, how can I find the subject and property of the claim it belongs to?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q24768234-21FD46F0-DC75-472C-A1C2-4C5683867575> . }


Question: Who are the actors that starred alongside Jean-Paul Belmondo in films?

SELECT ?actor ?actorLabel WHERE { ?film wdt:P161 wd:Q106255 . ?film wdt:P161 ?actor . FILTER (?actor != wd:Q106255) . ?actor wdt:P31 wd:Q5 . ?actor rdfs:label ?actorLabel . FILTER (LANG(?actorLabel) = "en")}

Can you list the co-stars of the French actor Jean-Paul Belmondo?

Which human actors appeared in the same movies as Jean-Paul Belmondo?

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


Question: Swedish urban areas with their coordinates and Wikipedia page titles

SELECT ?urbanCode ?urbanArea ?urbanAreaLabel ?wikipediaUrl ?pageTitle ?coordinates WHERE { ?urbanArea wdt:P775 ?urbanCode . OPTIONAL { ?urbanArea p:P625 ?coordStmt . ?coordStmt ps:P625 ?coordinates . } OPTIONAL { ?wikipediaUrl schema:about ?urbanArea ; schema:isPartOf <https://sv.wikipedia.org/> . BIND( SUBSTR( STR( ?wikipediaUrl ), 31, 99 ) AS ?encodedTitle ) BIND( REPLACE( ?encodedTitle , "%C3%B6" , "ö" ) AS ?tmp1 ) BIND( REPLACE( ?tmp1 , "%C3%A4" , "ä" ) AS ?tmp2 ) BIND( REPLACE( ?tmp2 , "%C3%A5" , "å" ) AS ?tmp3 ) BIND( REPLACE( ?tmp3 , "%C3%96" , "Ö" ) AS ?tmp4 ) BIND( REPLACE( ?tmp4 , "%C3%84" , "Ä" ) AS ?tmp5 ) BIND( REPLACE( ?tmp5 , "%C3%85" , "Å" ) AS ?tmp6 ) BIND( REPLACE( ?tmp6 , "_" , " " ) AS ?pageTitleRaw ) BIND( REPLACE( ?pageTitleRaw , ",.*" , "" ) AS ?pageTitle ) } ?urbanArea rdfs:label ?urbanAreaLabel . FILTER( LANG( ?urbanAreaLabel ) = "sv" ) } ORDER BY ASC ( ?urbanCode )

What are the Swedish urban areas, their locations, and simplified Wikipedia page titles?

List all Swedish urban areas along with their geographic coordinates and the names used in their Swedish Wikipedia articles, excluding municipality names.

SELECT ?var1 ?var2 ?var2Label ?var3 ?var4 ?var5 ?var6 WHERE { ?var2 <http://www.wikidata.org/prop/direct/P775> ?var1 . OPTIONAL { ?var2 <http://www.wikidata.org/prop/P625> ?var7 . ?var7 <http://www.wikidata.org/prop/statement/P625> ?var6 . } OPTIONAL { BIND ( SUBSTR ( STR ( ?var3 ) ,"31"^^<http://www.w3.org/2001/XMLSchema#integer> ,"99"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?var4 ). BIND ( REPLACE ( ?var4 , ",.*", "" ) AS ?var8 ). BIND ( REPLACE ( ?var8 , "%C3%B6", "ö" ) AS ?var9 ). BIND ( REPLACE ( ?var9 , "%C3%A4", "ä" ) AS ?var10 ). BIND ( REPLACE ( ?var10 , "%C3%A5", "å" ) AS ?var11 ). BIND ( REPLACE ( ?var11 , "%C3%96", "Ö" ) AS ?var12 ). BIND ( REPLACE ( ?var12 , "%C3%84", "Ä" ) AS ?var13 ). BIND ( REPLACE ( ?var13 , "%C3%85", "Å" ) AS ?var14 ). BIND ( REPLACE ( ?var14 , "_", " " ) AS ?var5 ). ?var3 <http://schema.org/about> ?var2 ; <http://schema.org/isPartOf> <https://sv.wikipedia.org/> . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv,en". } } ORDER BY ASC( ?var1 )


Question: Scholarly articles authored by Ugutz Unzueta, including co-authors, publication journals, and dates.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ( MIN( ?pubDate ) AS ?earliestPubDate ) ?work ?workLabel ( GROUP_CONCAT( DISTINCT ?typeLabel ; SEPARATOR = ", " ) AS ?types ) ( SAMPLE( ?pages ) AS ?sampledPages ) ?journal ?finalJournalLabel ( GROUP_CONCAT( DISTINCT ?finalAuthorLabel ; SEPARATOR = ", " ) AS ?coAuthors ) WHERE {
  ?work wdt:P50 wd:Q41545312 .
  ?work wdt:P50 ?author .
  OPTIONAL {
    ?author rdfs:label ?authorLabel .
    FILTER ( LANG( ?authorLabel ) = "en" )
  }
  BIND( COALESCE ( ?authorLabel , SUBSTR( STR( ?author ) , 32 ) ) AS ?finalAuthorLabel ) OPTIONAL {
    ?work wdt:P31 ?type .
    ?type rdfs:label ?typeLabel .
    FILTER ( LANG( ?typeLabel ) = "en" )
  }
  OPTIONAL {
    ?work wdt:P577 ?pubDateRaw .
    BIND( xsd:date ( ?pubDateRaw ) AS ?pubDate )
  }
  OPTIONAL {
    ?work wdt:P1104 ?pages .
  }
  OPTIONAL {
    ?work wdt:P1433 ?journal .
    ?journal rdfs:label ?journalLabel .
    FILTER ( LANG( ?journalLabel ) = "en" )
  }
  BIND( COALESCE ( ?journalLabel , SUBSTR( STR( ?journal ) , 32 ) ) AS ?finalJournalLabel ) ?work rdfs:label ?workLabel .
  FILTER ( LANG( ?workLabel ) = "en" )
}
GROUP BY ?work ?workLabel ?journal ?finalJournalLabel
ORDER BY DESC ( ?earliestPubDate )

What are all the research papers written by Ugutz Unzueta, who are his co-authors, and in which journals were they published?

Please list all the scientific publications by Ugutz Unzueta, showing the publication date, journal, type of work, and all contributing authors.

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


Question: What is the most specific common category that both Juan Santamaría International Airport and the Holland Tunnel belong to?

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

Which superclass is shared by both the airport in Costa Rica and the road tunnel in the United States, and has the shortest combined distance in the subclass hierarchy?

Find the lowest-level class in Wikidata's hierarchy that is a superclass of both Juan Santamaría International Airport and the Holland Tunnel.

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


Question: What properties link external resources to Tick-borne paroxysmal rickettsiosis?

PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?property WHERE {
  ?resource ?property wd:Q41788331 .
}

Which property is used by external websites to indicate they are about the disease Tick-borne paroxysmal rickettsiosis?

Show me the relationship that connects any web resource to the Wikidata item for Tick-borne paroxysmal rickettsiosis.

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


Question: Serbian Wikipedia pages linked to Wikidata items marked as permanent duplicates.

PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?duplicateItem ?srArticle WHERE {
  ?duplicateItem wdt:P31 wd:Q21286738 .
  ?srArticle schema:about ?duplicateItem ; schema:isPartOf <https://sr.wikipedia.org/> .
}

Which Serbian Wikipedia articles are associated with Wikidata items that are marked as permanent duplicates?

List all Serbian Wikipedia pages that point to Wikidata items which are duplicates and cannot be merged.

SELECT * WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q21286738> . ?var2 <http://schema.org/about> ?var1 ; <http://schema.org/isPartOf> <https://sr.wikipedia.org/> . }


Question: Chemical substances with their PubChem CID, CAS number, and discovery date.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?chemical ?chemicalLabel ?pubChemId ?casNumber ?discoveryDate WHERE {
  ?chemical wdt:P662 ?pubChemId .
  ?chemical wdt:P231 ?casNumber .
  ?chemical wdt:P575 ?discoveryDate .
  ?chemical rdfs:label ?chemicalLabel .
  FILTER ( LANG( ?chemicalLabel ) = "en" )
}

What are the chemical elements and compounds, along with their PubChem IDs, CAS registry numbers, and the years they were discovered?

Please list all chemical substances with their English names, PubChem CID, CAS number, and date of discovery.

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


Question: Swedish urban areas (tätorter) with population as of December 31, 2010, sorted by urban area code.

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?urbanArea ?label ?code ?population ?date WHERE {
  ?urbanArea wdt:P31 wd:Q12813115 .
  ?urbanArea wdt:P775 ?code .
  ?urbanArea p:P1082 ?statement .
  ?statement ps:P1082 ?population .
  ?statement pq:P585 ?date .
  FILTER(?date = "2010-12-31T00:00:00Z" ^^ xsd:dateTime)
  OPTIONAL {
    ?urbanArea rdfs:label ?label .
    FILTER(LANG(?label) = "en")
  }
}
ORDER BY ASC(?code)

What are the names, Swedish urban area codes, and populations of all urban areas in Sweden on December 31, 2010?

List all urban areas in Sweden from 2010, including their official codes, population figures, and English names, ordered by their Swedish urban area code.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q12813115> . ?var1 <http://www.wikidata.org/prop/direct/P775> ?var2 . ?var1 <http://www.wikidata.org/prop/P1082> ?var5 . ?var5 <http://www.wikidata.org/prop/statement/P1082> ?var3 . ?var5 <http://www.wikidata.org/prop/qualifier/P585> ?var4 . FILTER ( ( ( ?var4 = "2010-12-31T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv". } } ORDER BY ASC( ?var2 )


Question: What is the most specific shared superclass between Stanley Crouch and Judea based on their types?

SELECT ?ancestor (?dist1 + ?dist2 AS ?totalDistance)
WHERE {
  {
    SELECT ?ancestor (MIN(?dist) AS ?dist1)
    WHERE {
      wd:Q355531 wdt:P31 ?type1 .
      ?type1 wdt:P279+ ?mid .
      ?mid wdt:P279* ?ancestor .
      BIND (COUNT(?mid) AS ?dist)
    }
    GROUP BY ?ancestor
  }

  {
    SELECT ?ancestor (MIN(?dist) AS ?dist2)
    WHERE {
      wd:Q104028 wdt:P31 ?type2 .
      ?type2 wdt:P279+ ?mid .
      ?mid wdt:P279* ?ancestor .
      BIND (COUNT(?mid) AS ?dist)
    }
    GROUP BY ?ancestor
  }
}
ORDER BY ASC(?totalDistance)
LIMIT 1

Which class is the closest common ancestor in the subclass hierarchy for both Stanley Crouch and the historical region of Judea?

Find the entity that is the most specific shared superclass of the types of Stanley Crouch and Judea, measured by the sum of shortest subclass paths.

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q355531> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q104028> ; <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: Chemical compounds with English names and Czech alternative 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/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?var1 ?var1Label ?var2 WHERE {
  ?var1 wdt:P31 wd:Q11173 .
  OPTIONAL {
    ?var1 rdfs:label ?var1Label .
    FILTER(LANG(?var1Label) = "en")
  }
  OPTIONAL {
    ?var1 skos:altLabel ?var2 .
    FILTER(LANG(?var2) = "cs")
  }
}

What are the chemical compounds and their English names, along with any Czech alternative names?

List all chemical compounds with their English labels and Czech alternative labels if available.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> * <http://www.wikidata.org/entity/Q11173> . OPTIONAL { ?var1 <http://www.w3.org/2004/02/skos/core#altLabel> ?var2 . FILTER ( ( ( LANG ( ?var2 ) = "cs" ) ) ) . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "cs". } }


Question: What pairs of topics are commonly associated with episodic memory through shared works?

SELECT DISTINCT ?topic1 ?topic1Label ?topic2 ?topic2Label WHERE { { ?relatedItem (wdt:P921 / wdt:P31* / wdt:P279*) wd:Q18646 . } UNION { ?relatedItem (wdt:P921 / wdt:P361+) wd:Q18646 . } UNION { ?relatedItem (wdt:P921 / wdt:P1269+) wd:Q18646 . } ?relatedItem wdt:P921 ?topic1 , ?topic2 . FILTER ( ?topic1 != wd:Q18646 && ?topic2 != wd:Q18646 && ?topic1 != ?topic2 ) OPTIONAL { ?topic1 rdfs:label ?topic1Label . FILTER(LANG(?topic1Label) = "en") } OPTIONAL { ?topic2 rdfs:label ?topic2Label . FILTER(LANG(?topic2Label) = "en") } }

Which pairs of subjects, such as diseases or research methods, appear together as main topics in works that are either parts of, facets of, or subclasses of episodic memory?

Show me all pairs of distinct topics (excluding episodic memory itself) that are both main subjects of the same work that is related to episodic memory as a subclass, component, or aspect.

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


Question: Russian-language literary works by Andrzej Sapkowski

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 ?work ?workLabel ?author ?authorLabel WHERE {
  ?work ( wdt:P31 / wdt:P279 * ) wd:Q7725634 .
  ?work wdt:P50 ?author .
  ?author rdfs:label ?authorLabel .
  ?work rdfs:label ?workLabel .
  FILTER ( LANG( ?workLabel ) = "ru" ) FILTER ( ?author = wd:Q312101 )
}
LIMIT 1000

What are the Russian titles of literary works authored by Andrzej Sapkowski?

List all literary works in Russian that were written by Andrzej Sapkowski.

SELECT ?var1 ?var1Label ?var2 ?var2Label WHERE { ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q7725634> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P50> ?var2 . ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . } FILTER ( ( ( LANG ( ?var1Label ) = "ru" ) ) ) . FILTER ( ( REGEX ( ?var2Label , "Сапковский" ) ) ) . } LIMIT 1000