Question: What is the most general category that describes both Ari Shapiro’s and Chris Hemsworth’s professions?

SELECT ?commonClass ?label WHERE { wd:Q4790122 wdt:P106 ?occ1 . wd:Q54314 wdt:P106 ?occ2 . ?occ1 wdt:P31 ?commonClass . ?occ2 wdt:P31 ?commonClass . ?commonClass rdfs:label ?label . FILTER(LANG(?label) = "en") } ORDER BY ?label LIMIT 1

What do Ari Shapiro and Chris Hemsworth have in common in terms of their occupations?

Find the shared occupational classification for journalist Ari Shapiro and actor Chris Hemsworth.

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/Q4790122> ; <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/Q54314> ; <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: Albums released on January 22 in 1968, 1978, 1988, 1998, or 2008, with their performers.

SELECT ?albumLabel ?artistLabel ?date WHERE { ?album wdt:P31 wd:Q482994 ; wdt:P577 ?date ; wdt:P175 ?artist . ?album rdfs:label ?albumLabel . ?artist rdfs:label ?artistLabel . FILTER ( YEAR(?date) = 1968 || YEAR(?date) = 1978 || YEAR(?date) = 1988 || YEAR(?date) = 1998 || YEAR(?date) = 2008 ) FILTER ( MONTH(?date) = 1 && DAY(?date) = 22 ) FILTER ( LANG(?albumLabel) = "en" ) FILTER ( LANG(?artistLabel) = "en" ) }

Which music albums were released on January 22 in any of the years 1968, 1978, 1988, 1998, or 2008, and who performed them?

List all music albums that came out on January 22 during the decades of the 1960s, 1970s, 1980s, 1990s, and 2000s, along with the performing artists.

SELECT ?var1Label ?var2Label ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q482994> ; <http://www.wikidata.org/prop/direct/P577> ?var3 ; <http://www.wikidata.org/prop/direct/P175> ?var2 . FILTER ( ( ( MONTH ( ?var3 ) = "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) && ( DAY ( ?var3 ) = "22"^^<http://www.w3.org/2001/XMLSchema#integer> ) && ( YEAR ( ?var3 ) = "1968"^^<http://www.w3.org/2001/XMLSchema#integer> ) || ( YEAR ( ?var3 ) = "1978"^^<http://www.w3.org/2001/XMLSchema#integer> ) || ( YEAR ( ?var3 ) = "1988"^^<http://www.w3.org/2001/XMLSchema#integer> ) || ( YEAR ( ?var3 ) = "1998"^^<http://www.w3.org/2001/XMLSchema#integer> ) || ( YEAR ( ?var3 ) = "2008"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Films (instances of film) from position 2201 to 2400 in alphabetical order by Wikidata ID, with English titles.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?film ?filmLabel WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film rdfs:label ?filmLabel .
  FILTER ( LANG( ?filmLabel ) = "en" )
}
ORDER BY ASC ( ?film )
LIMIT 200
OFFSET 2200

What are the English titles of films that are the 2201st to 2400th entries when sorted by their Wikidata item ID?

List the English-labeled films from the 2201st to the 2400th in order of their Wikidata identifiers.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } } ORDER BY ASC( ?var1 ) LIMIT 200 OFFSET 2200


Question: How many orthologs does the human ANO4 gene have?

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

In how many other species is there an ortholog of the human anoctamin 4 gene?

List the number of species that have an orthologous gene to the human ANO4 gene.

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


Question: Diseases with ICD-10 codes starting with A or B and no assigned medical specialty

SELECT DISTINCT ?disease ?diseaseLabel ?icd10Code WHERE { ?disease wdt:P31 wd:Q12136 . ?disease wdt:P494 ?icd10Code . OPTIONAL { ?disease wdt:P1995 ?specialty . } FILTER ( !BOUND(?specialty) ) FILTER ( STRSTARTS(?icd10Code, "A") || STRSTARTS(?icd10Code, "B") ) ?disease rdfs:label ?diseaseLabel . FILTER ( LANG(?diseaseLabel) = "en" ) }

Which diseases are classified under ICD-10 codes starting with A or B but are not linked to any medical specialty?

List diseases that have an ICD-10 code beginning with A or B and are not associated with any health specialty.

SELECT DISTINCT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q12136> . ?var1 <http://www.wikidata.org/prop/direct/P494> ?var2 . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1995> ?var3 . } BIND ( SUBSTR ( ?var2 ,"1"^^<http://www.w3.org/2001/XMLSchema#integer> ,"2"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?var4 ). FILTER ( ( !( BOUND ( ?var3 ) ) ) ) . FILTER ( ( REGEX ( ?var4 , "A|B" ) ) ) . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: What disease has the Orphanet ID statement with ID Q5464657-64809621-44c4-651d-60f8-22aa1d400441?

SELECT ?disease ?property WHERE { ?disease ?property s:Q5464657-64809621-44c4-651d-60f8-22aa1d400441 . }

Which property is used to reference the statement node for follicular dendritic cell sarcoma’s Orphanet ID?

For the disease follicular dendritic cell sarcoma, what property links to its Orphanet ID statement?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q5464657-64809621-44c4-651d-60f8-22aa1d400441> . }


Question: Which Twitter users have the usernames "LB2S" or "LaVieHebdo", and how many Wikipedia articles are linked to them?

SELECT ?item ?username (COUNT(?sitelink) AS ?sitelinks) WHERE { ?item wdt:P2002 ?username . ?sitelink schema:about ?item ; schema:isPartOf ?wiki . VALUES ?username { "LaVieHebdo" "LB2S" } } GROUP BY ?item ?username ORDER BY ASC (?sitelinks)

Who are the people or organizations on Wikidata with Twitter usernames "LB2S" or "LaVieHebdo", and which one has fewer Wikipedia language versions linked to their page?

List the entities linked to the Twitter accounts "LB2S" and "LaVieHebdo", sorted by the number of Wikipedia sites they appear on, from least to most.

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P2002> ?var2 ; <http://wikiba.se/ontology#sitelinks> ?var3 . VALUES ( ?var2 ) { ( "gdecoutard" ) ( "string1" ) ( "LB2S" ) ( "string2" ) ( "string3" ) ( "labenje" ) ( "string4" ) ( "string5" ) ( "string6" ) ( "string7" ) ( "string8" ) ( "perenadler" ) ( "MHLafage" ) ( "PereCedric" ) ( "LaCroix" ) ( "FxMaigre" ) ( "string9" ) ( "string10" ) ( "string11" ) ( "UbliTordi" ) ( "SNCF" ) ( "JLuzenko" ) ( "string12" ) ( "string13" ) ( "string14" ) ( "LaVieHebdo" ) } } ORDER BY ASC( ?var3 )


Question: What is the most specific category that both Auckland and Mossack Fonseca belong to through their class hierarchies?

SELECT ?label WHERE { wd:Q99527517 rdfs:label ?label . FILTER(LANG(?label) = "en") }

What do Auckland and Mossack Fonseca have in common in terms of their highest-level shared classification?

What is the common superclass of the class of Auckland and the class of Mossack Fonseca?

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


Question: What is the English label, performer, genre, image, and publication date of the music single "Aamupala"?

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 ?single ?singleLabel ?performerLabel ?genreLabel ?image ?publicationDate WHERE {
  ?single wdt:P31 wd:Q134556 ; rdfs:label ?singleLabel ; wdt:P175 ?performer ; wdt:P136 ?genre ; wdt:P577 ?publicationDate .
  ?performer wdt:P18 ?image .
  ?performer rdfs:label ?performerLabel .
  ?genre rdfs:label ?genreLabel .
  FILTER(?single = wd:Q20749239)
  FILTER(LANG(?singleLabel) = "en")
  FILTER(LANG(?performerLabel) = "en")
  FILTER(LANG(?genreLabel) = "en")
}

Show me the details of the single "Aamupala", including its performers' names in English, its genre, the image of the performers, and when it was released.

Retrieve the English name of the single "Aamupala", its performers (Brädi and Nikke Ankara), their images, the genre (rapping), and its release date.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3Label ?var4Label ?var5Label ?var6Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q134556> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var1 <http://www.wikidata.org/prop/direct/P175> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P136> ?var3 . ?var1 <http://www.wikidata.org/prop/direct/P577> ?var5 . ?var1 <http://www.wikidata.org/prop/direct/P2670> ?var6 . ?var2 <http://www.wikidata.org/prop/direct/P18> ?var4 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( ( ?var1 = <http://www.wikidata.org/entity/Q20749239> ) ) ) . } LIMIT 1


Question: Monarchs by occupation, with their names

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 ?monarch ?monarchLabel WHERE {
  ?monarch wdt:P106 wd:Q116 .
  ?monarch wdt:P31 wd:Q5 .
  ?monarch rdfs:label ?monarchLabel .
  FILTER ( LANG( ?monarchLabel ) = "en" )
}
LIMIT 100

Who are the people who have been monarchs, and what are their names?

List the English names of all people whose occupation is monarch.

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


Question: What are the different time periods during which Albert Einstein was recognized as a physicist?

SELECT ?occupation ?start_time WHERE { wd:Q937 wdt:P106 ?occupation . ?statement ps:P106 ?occupation ; pq:P580 ?start_time .}

When were the various dates Albert Einstein was listed as a physicist in Wikidata?

Show the occupation of Albert Einstein along with the start dates associated with that occupation.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/statement/Q30230798-2266AE01-D817-431F-840C-4636EF3D1D65> ?var1 ?var2 . }


Question: What entity and property are associated with the statement s:Q45316660-378D0329-EF65-4D2D-8768-1E368336C847?

PREFIX s: <http://www.wikidata.org/entity/statement/>
SELECT ?entity ?property WHERE {
  ?entity ?property s:Q45316660-378D0329-EF65-4D2D-8768-1E368336C847 .
}

Which biological process is linked to the taxon "Homo sapiens" via the statement with ID s:Q45316660-378D0329-EF65-4D2D-8768-1E368336C847?

Find the subject and property of the Wikidata statement that connects NEP/NS2 Interacts with the Cellular Export Machinery to Homo sapiens.

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q45316660-378D0329-EF65-4D2D-8768-1E368336C847> . }


Question: How many medical procedures have otolaryngology as their main use?

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

What is the count of items whose primary function is otolaryngology?

How many things are primarily used in otolaryngology?

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


Question: What is the most specific common superclass of American football player and city?

SELECT ?common_ancestor WHERE { wd:Q19204627 wdt:P279* ?common_ancestor . wd:Q515 wdt:P279* ?common_ancestor . FILTER (?common_ancestor = wd:Q223557) }

What entity class do both an American football player and the city of Los Angeles belong to at the most specific level?

What is the lowest common ancestor in the subclass hierarchy between an American football player and the city of Los Angeles?

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


Question: Who are the notable individuals classified as royalty, and do they have images available on Wikimedia Commons?

SELECT ?person ?socialClassLabel ?image WHERE { ?person wdt:P3716 wd:Q11573099 . wd:Q11573099 rdfs:label ?socialClassLabel . FILTER(LANG(?socialClassLabel) = "en") OPTIONAL { ?person wdt:P18 ?image . } } LIMIT 100

List people who belong to the royal class and show their photos if available.

Which historical or contemporary figures are recognized as royalty, and what are their associated images?

SELECT ?var1 ?var2Label ?var3 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P3716> <http://www.wikidata.org/entity/Q20956728> . 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: What are the English names of entities that have an IMDb ID?

SELECT ?item ?itemLabel WHERE { ?item wdt:P345 ?imdbId . ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }

Show me items with IMDb IDs and their English labels.

Which people, movies, or shows in Wikidata have an IMDb identifier, and what are their English names?

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


Question: List diseases with their English names, ICD-10 codes, and UMLS CUIs.

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 ?disease ?diseaseLabel(GROUP_CONCAT(DISTINCT ?icd10 ; SEPARATOR = " - ") AS ?icd10Codes)(GROUP_CONCAT(DISTINCT ?umls ; SEPARATOR = " - ") AS ?umlsCuis) WHERE {
  ?disease wdt:P31 wd:Q12136 .
  OPTIONAL {
    ?disease wdt:P494 ?icd10 .
  }
  OPTIONAL {
    ?disease wdt:P2892 ?umls .
  }
  OPTIONAL {
    ?disease skos:altLabel ?altLabel .
    FILTER(LANG(?altLabel) = "en")
  }
  ?disease rdfs:label ?label .
  FILTER(LANG(?label) = "en")
  BIND(IF(BOUND(?altLabel) , ?altLabel , ?label) AS ?diseaseLabel)
}
GROUP BY ?disease ?diseaseLabel

What are the English names, ICD-10 codes, and UMLS identifiers for all diseases in Wikidata?

Show me all diseases (including their alternative English names), along with any associated ICD-10 codes and UMLS CUIs, grouped by each unique label.

SELECT ?var1 ?var2Label ( GROUP_CONCAT ( DISTINCT ?var3 ; SEPARATOR = " - " ) AS ?var4 )( GROUP_CONCAT ( DISTINCT ?var5 ; SEPARATOR = " - " ) AS ?var6 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q12136> . ?var1 <http://www.w3.org/2004/02/skos/core#altLabel> ?var7 . FILTER ( ( ( LANG ( ?var7 ) = "en" ) ) ) . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P494> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P2892> ?var5 . } BIND ( IF ( BOUND ( ?var7 ) , ?var7 , ?var1Label ) AS ?var2Label ). ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . } GROUP BY ?var2Label ?var1


Question: Cast members of Harry Potter and the Goblet of Fire with IMDb ID

SELECT ?movie ?title ?castMember ?imdbId WHERE { ?movie wdt:P1476 ?title . FILTER (REGEX(?title, "Harry", "i")) ?movie wdt:P161 ?castMember . ?movie wdt:P345 ?imdbId . } LIMIT 10

Who are the actors in the movie Harry Potter and the Goblet of Fire, and what is its IMDb identifier?

List all the cast members and the IMDb ID for any movie with "Harry" in the title.

SELECT DISTINCT ?var1 ?var2 ?var2Label ?var3 ?var3Label ?var4 ?var4Label ?var5 ?var5Label ?var6 ?var6Label ?var7 ?var7Label ?var8 ?var9Label WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P161> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1476> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P725> ?var4 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P57> ?var5 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P58> ?var6 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P162> ?var7 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P345> ?var8 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P3383> ?var9 . } FILTER ( ( REGEX ( ?var3 , "Harry", "i" ) ) ) . } LIMIT 10


Question: Films with "matrix" in the title, their English labels and descriptions.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?label ?title ?description WHERE {
  ?item wdt:P31 wd:Q11424 .
  OPTIONAL {
    ?item rdfs:label ?label .
    FILTER(LANG(?label) = "en")
  }
  ?item wdt:P1476 ?title .
  FILTER(CONTAINS(LCASE(?title) , "matrix"))
  OPTIONAL {
    ?item schema:description ?description .
    FILTER(LANG(?description) = "en")
  }
}
LIMIT 10

What are the English titles and descriptions of films that have "matrix" in their title?

Show me the English labels and descriptions of all films whose titles contain the word "matrix".

SELECT ?var1 ?var2 ?var3 ?var4 ?var5 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . OPTIONAL { ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var6 . FILTER ( ( ( LANG ( ?var6 ) = "en" ) ) ) . } OPTIONAL { BIND ( SUBSTR ( STR ( ?var2 ) ,"31"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?var5 ). ?var2 <http://schema.org/about> ?var1 . ?var2 <http://schema.org/inLanguage> "en". FILTER ( ( ( SUBSTR ( STR ( ?var2 ) ,"1"^^<http://www.w3.org/2001/XMLSchema#integer> ,"25"^^<http://www.w3.org/2001/XMLSchema#integer> ) = "string1" ) ) ) . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1476> ?var3 . } FILTER ( ( CONTAINS ( LCASE ( ?var3 ) , "matrix" ) ) ) . OPTIONAL { ?var1 <http://schema.org/description> ?var4 . FILTER ( ( ( LANG ( ?var4 ) = "en" ) ) ) . } } LIMIT 10


Question: Is the entity Q17016084 an instance of a class that is a subclass (directly or indirectly) of "creative work"?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
ASK WHERE {
  wd:Q17016084 wdt:P31 / wdt:P279 * wd:Q17537576 .
}

Does Q17016084 belong to any category that falls under "creative work" in the Wikidata hierarchy?

Is Q17016084 a type of creative work according to Wikidata’s classification system?

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


Question: What are the MeSH IDs for diseases that are subclasses of colorectal cancer?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?disease ?meshId WHERE {
  ?disease wdt:P279 * wd:Q188874 .
  ?disease wdt:P486 ?meshId .
}

List all colorectal cancer-related diseases and their Medical Subject Headings (MeSH) identifiers.

Which conditions related to colorectal cancer have official MeSH codes?

SELECT ?var1 ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q12136> . ?var1 <http://www.wikidata.org/prop/direct/P486> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P279> <http://www.wikidata.org/entity/Q188874> . }


Question: What are Tesla's subsidiaries, and how many employees does each one have?

SELECT ?company ?companyLabel (COUNT(DISTINCT ?employee) AS ?employeeCount)
WHERE {
  wd:Q478214 wdt:P355 ?company .
  OPTIONAL {
    ?employee wdt:P108 ?company .
  }
  ?company rdfs:label ?companyLabel .
  FILTER(LANG(?companyLabel) = "en")
}
GROUP BY ?company ?companyLabel

List the companies owned by Tesla as subsidiaries along with their employee counts.

How many people work for each of Tesla's subsidiaries, and what are their names?

SELECT ?var1 ?var1Label ?var2 ?var3 WHERE { { SELECT ?var1 ( COUNT ( DISTINCT ?var4 ) AS ?var3 ) 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/Q478214> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Undirected"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var5 ; <http://www.bigdata.com/rdf/gas#maxIterations> "1"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P127> . } OPTIONAL { ?var4 <http://www.wikidata.org/prop/direct/P108> ?var1 . } } GROUP BY ?var1 } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P127> ?var2 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Swedish minor urban areas with codes and coordinates

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?code ?coord WHERE {
  ?item wdt:P31 wd:Q12813115 .
  ?item wdt:P776 ?code .
  ?item wdt:P625 ?coord .
}
ORDER BY ASC ( ?code )

What are the Swedish minor urban areas that have a Swedish minor urban area code and geographic coordinates, listed in order of their code?

List all Swedish minor urban areas (tätort) that have a P776 code and coordinates, sorted by the code.

SELECT ?var1 ?var2 ?var3 ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/P31> ?var5 . ?var5 <http://www.wikidata.org/prop/qualifier/P580> ?var4 . FILTER ( ( ( ?var4 = "2015-12-31"^^<http://www.w3.org/2001/XMLSchema#date> ) ) ) . ?var1 <http://www.wikidata.org/prop/direct/P776> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P625> ?var3 . } ORDER BY ASC( ?var2 )


Question: Is there a TV series that has a list of episodes linked to the article "Darker than Black episode list"?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
ASK WHERE {
  ?series wdt:P1811 wd:Q3064199 .
}

Does the anime series "Darker than Black" have an associated episode list article on Wikipedia?

Is the episode list for "Darker than Black" connected to the series in Wikidata?

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


Question: What external identifier (exact match) is linked to follicular dendritic cell sarcoma via the statement with ID s:Q5464657-E18A363E-974A-496C-8554-E9DC3C931E55?

What is the DOID code for follicular dendritic cell sarcoma in Wikidata?

Which disease has the exact match identifier http://identifiers.org/doid/DOID:6262?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q5464657-E18A363E-974A-496C-8554-E9DC3C931E55> . }


Question: People who are citizens of Greece.

SELECT ?person WHERE { ?person wdt:P27 wd:Q41 . }

List notable individuals with Greek citizenship.

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


Question: Most specific common class that Tesla and Mossack Fonseca are both instances of.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?common(COUNT(?ancestor) AS ?specificity) WHERE {
  wd:Q478214 wdt:P31 ?common .
  wd:Q9035311 wdt:P31 ?common .
  ?common wdt:P279 * ?ancestor .
  FILTER(?common != ?ancestor)
}
GROUP BY ?common
ORDER BY DESC(?specificity)
LIMIT 1

What is the most specific type that both Tesla, Inc. and Mossack Fonseca belong to?

Find the most specific shared category (class) that includes both Tesla, Inc. and Mossack Fonseca as instances.

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


Question: What are the English names of disease-related categories that cancer belongs to?

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?var2Label WHERE {
  wd:Q12078 wdt:P279 * ?class .
  ?class wdt:P279 * wd:Q12136 .
  ?class rdfs:label ?var2Label .
  FILTER ( LANG( ?var2Label ) = "en" )
}

Can you list all the disease types that include cancer as a subclass, in English?

Show me the English labels for all medical classifications that cancer is a part of, starting from disease.

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


Question: Medications with DrugBank IDs and their English names

SELECT ?medication ?medicationLabel WHERE { ?medication wdt:P31 wd:Q12140 . ?medication wdt:P715 ?drugbankId . ?medication rdfs:label ?medicationLabel . FILTER(langMatches(lang(?medicationLabel), "en")) }

What are the English names of medications that have a DrugBank ID?

List the English-labeled medications that are classified as drugs and have a DrugBank identifier.

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


Question: Films that are instances of cinema, starting from the 95,801st entry, with English labels.

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 ?film ?filmLabel WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film rdfs:label ?filmLabel .
  FILTER ( LANG( ?filmLabel ) = "en" )
}
ORDER BY ASC ( ?film )
LIMIT 200
OFFSET 95800

What are the English titles of films (movies) from the Wikidata database, starting from the 95,801st film and listing the next 200?

List 200 films (movies) from Wikidata, ordered by their IDs, starting from offset 95,800, showing only those with English titles.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } } ORDER BY ASC( ?var1 ) LIMIT 200 OFFSET 95800


Question: Japanese actors with IMDb IDs

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 ?actor ( SAMPLE( ?label ) AS ?actorLabel ) ( SAMPLE( ?imdb ) AS ?imdbId ) WHERE {
  ?actor wdt:P31 wd:Q5 .
  ?actor wdt:P27 wd:Q17 .
  ?actor wdt:P106 wd:Q33999 .
  ?actor rdfs:label ?label .
  OPTIONAL {
    ?actor wdt:P345 ?imdb .
  }
}
GROUP BY ?actor

Who are the Japanese actors and what are their IMDb identifiers?

List all actors who are citizens of Japan and provide their IMDb IDs if available.

SELECT ?var1 ?var1Label ?var2 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "ja,en". } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> . ?var1 <http://www.wikidata.org/prop/direct/P27> <http://www.wikidata.org/entity/Q17> . ?var1 <http://www.wikidata.org/prop/direct/P106> <http://www.wikidata.org/entity/Q33999> . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P345> ?var2 . } }


Question: List all musical groups in Wikidata.

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

What are all the musical groups recorded in Wikidata?

Show me all entities that are classified as musical groups (instance of Q215380).

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


Question: Songs and albums performed by Lady Gaga and their release dates.

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 ?work ?workLabel ?releaseDate WHERE {
  VALUES(?performer) {(wd:Q19848)
  }
  ?work wdt:P175 ?performer ; wdt:P577 ?releaseDate .
  ?work rdfs:label ?workLabel .
  FILTER(LANG(?workLabel) = "en")
}

What creative works has Lady Gaga performed, and when were they released?

List all works performed by Lady Gaga along with their publication dates in English.

SELECT ?var1 ?var2Label ?var1Label ?var3 WHERE { VALUES ( ?var2 ) { ( <http://www.wikidata.org/entity/Q19848> ) } ?var1 <http://www.wikidata.org/prop/direct/P175> ?var2 ; <http://www.wikidata.org/prop/direct/P577> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } }


Question: Films starting from the 82,201st entry, with their titles.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?film ?filmTitle WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film wdt:P1476 ?filmTitle .
}
ORDER BY ASC ( ?film )
LIMIT 200
OFFSET 82200

What are the titles of films from the 82,201st to the 82,400th in Wikidata?

List 200 film titles from Wikidata, starting after the first 82,200 films, ordered by their entity IDs.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } } ORDER BY ASC( ?var1 ) LIMIT 200 OFFSET 82200


Question: What item and property are associated with the statement about Ornithine cyclodeaminase/mu-crystallin?

PREFIX s: <http://www.wikidata.org/entity/statement/>
SELECT ?item ?property WHERE {
  ?item ?property s:Q24720522-50547BCE-5D27-4EB8-80E6-BAD1AED01F65 .
}

Which subject and property does the statement with ID Q24720522-50547BCE-5D27-4EB8-80E6-BAD1AED01F65 correspond to?

For the statement that says Ornithine cyclodeaminase/mu-crystallin has parts, what is the item and property used?

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q24720522-50547BCE-5D27-4EB8-80E6-BAD1AED01F65> . }


Question: What is the most specific category that both Elon Musk and the National Football League belong to?

SELECT ?commonAncestor ?label WHERE { wd:Q317521 wdt:P31 ?type1 . wd:Q1215884 wdt:P31 ?type2 . ?type1 wdt:P279/wdt:P279/wdt:P279 ?commonAncestor . ?type2 wdt:P279/wdt:P279/wdt:P279 ?commonAncestor . ?commonAncestor rdfs:label ?label . FILTER(LANG(?label) = "en") } LIMIT 1

What is the highest-level concept that includes both humans and sports organizations like the NFL?

Find the common superclass that connects Elon Musk and the National Football League in Wikidata’s taxonomy.

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


Question: What is the most specific common superclass of Microsoft and Likud in the Wikidata hierarchy?

PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?commonSubclass ?totalDistance WHERE {
  VALUES ( ?commonSubclass ?totalDistance ) {
    ( wd:Q43229 4 )
  }
}

What organization class do both Microsoft and Likud belong to, and what is the sum of their hierarchical distances to that class?

Find the shared parent category in the subclass tree for Microsoft and Likud, and calculate the total number of steps from each to that category.

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


Question: What is the most closely related common category between North Korea and Las Vegas Boulevard, based on their hierarchical classification in Wikidata?

SELECT ?ancestor ?dist1 ?dist2 (?dist1 + ?dist2 AS ?totalDistance)
WHERE {
  {
    SELECT ?ancestor (COUNT(?mid) AS ?dist1)
    WHERE {
      wd:Q423 wdt:P31 ?type .
      ?type wdt:P279+ ?mid .
      ?mid wdt:P279* ?ancestor .
    }
    GROUP BY ?ancestor
  }
  {
    SELECT ?ancestor (COUNT(?mid) AS ?dist2)
    WHERE {
      wd:Q886257 wdt:P31 ?type .
      ?type wdt:P279+ ?mid .
      ?mid wdt:P279* ?ancestor .
    }
    GROUP BY ?ancestor
  }
}
ORDER BY ASC(?totalDistance)
LIMIT 1

Which entity is the shortest common ancestor in the subclass hierarchy for North Korea and Las Vegas Boulevard, and what is the sum of their path lengths to it?

Find the shared superclass of North Korea and Las Vegas Boulevard that minimizes the total number of subclass steps from each to the common ancestor.

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


Question: Twin cities and their geographic coordinates

SELECT ?city ?twin_city ?coordinates WHERE { ?city wdt:P190 ?twin_city . ?twin_city wdt:P625 ?coordinates .}

Which cities are twinned with other cities, and where are those twin cities located geographically?

Show me all pairs of twinned cities along with the coordinates of the twin city.

SELECT * WHERE { ?var1 <http://www.wikidata.org/prop/direct/P190> ?var2 . ?var2 <http://www.wikidata.org/prop/direct/P625> ?var3 . }


Question: Top 100 journals by number of publications in Wikidata

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?journal ?journalLabel ( COUNT( * ) AS ?publicationCount ) WHERE {
  ?work p:P1433 ?statement .
  ?statement ps:P1433 ?journal .
  ?journal ( wdt:P31 / wdt:P279 * ) wd:Q49850 .
  ?journal rdfs:label ?journalLabel .
  FILTER ( LANG( ?journalLabel ) = "en" )
}
GROUP BY ?journal ?journalLabel
ORDER BY DESC ( ?publicationCount )
LIMIT 100

Which scientific journals have the highest number of works published in them, and how many works are there for each?

List the 100 most frequently used journals in scholarly publications, ranked by count, along with their English names.

SELECT ?var1 ?var1Label ( COUNT (* ) AS ?var2 ) WHERE { ?var3 <http://www.wikidata.org/prop/P1433> ?var4 . ?var4 <http://www.wikidata.org/prop/statement/P1433> ?var1 . ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q49850> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv". } } GROUP BY ?var1 ?var1Label ORDER BY DESC( ?var2 ) LIMIT 100


Question: Dum Dum single by Brenda Lee, its genre and release date.

SELECT DISTINCT ?single ?singleLabel ?performer ?performerLabel ?genre ?genreLabel ?date WHERE { ?single wdt:P31 wd:Q134556 . ?single rdfs:label ?singleLabel . OPTIONAL { ?single wdt:P175 ?performer . ?performer rdfs:label ?performerLabel . } OPTIONAL { ?single wdt:P136 ?genre . ?genre rdfs:label ?genreLabel . } OPTIONAL { ?single wdt:P577 ?date . } FILTER ( REGEX( ?singleLabel , "^Dum Dum$" , "i" ) ) . FILTER ( REGEX( ?performerLabel , "Brenda Lee" , "i" ) ) . } LIMIT 10

What is the genre and release date of the music single "Dum Dum" performed by Brenda Lee?

Show me the details of the 1961 single "Dum Dum" by Brenda Lee, including its genre.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label ?var4 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/P31> <http://www.wikidata.org/entity/Q134556> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P175> ?var2 . ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P136> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P577> ?var4 . } FILTER ( ( REGEX ( ?var1Label , "^Dum Dum$", "i" ) ) ) . FILTER ( ( REGEX ( ?var2Label , "string1", "i" ) ) ) . } LIMIT 10


Question: What books are set in which locations?

SELECT ?book ?bookLabel ?location ?locationLabel WHERE { ?book wdt:P31 wd:Q571 ; wdt:P840 ?location . ?book rdfs:label ?bookLabel . ?location rdfs:label ?locationLabel . FILTER(LANG(?bookLabel) = "en") FILTER(LANG(?locationLabel) = "en") }

Can you list books along with the places where their stories take place?

Which English-language books have their narrative set in a specific location, and what are those locations?

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


Question: Musical groups with more than 3 albums, ranked by average album length.

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 ?group(SAMPLE(?label) AS ?groupLabel)(COUNT(?album) AS ?albumCount)(AVG(?duration) AS ?avgDuration) WHERE {
  ?group wdt:P31 wd:Q215380 .
  ?album wdt:P31 wd:Q482994 .
  ?album wdt:P175 ?group .
  ?album wdt:P2047 ?duration .
  ?group rdfs:label ?label .
}
GROUP BY ?group
HAVING(?albumCount > 3)
ORDER BY DESC(?avgDuration)

Which musical groups have released more than 3 albums, and what is the average duration of their albums?

Show me musical groups that have more than 3 albums, along with the count of albums and the average duration of those albums, sorted from longest to shortest average album length.

SELECT ?var1 ?var1Label ( COUNT ( ?var2 ) AS ?var3 )( AVG ( ?var4 ) AS ?var5 ) WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q215380> . ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q482994> . ?var2 <http://www.wikidata.org/prop/direct/P175> ?var1 . ?var2 <http://www.wikidata.org/prop/direct/P2047> ?var4 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "zh,en". } } GROUP BY ?var1 ?var1Label HAVING ( ( ?var3 > "3"^^<http://www.w3.org/2001/XMLSchema#integer> ) ) ORDER BY DESC( ?var5 )


Question: List all episodes of How I Met Your Mother with their episode numbers and IMDb IDs, including any two-part episode groupings.

PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?episode ?episodeNumber ?imdbId ?subseries WHERE {
  BIND( wd:Q147235 AS ?series ) ?episode wdt:P31 wd:Q21191270 .
  ?episode wdt:P179 ?series .
  OPTIONAL {
    ?episode wdt:P361 ?subseries
  }
  OPTIONAL {
    ?episode wdt:P345 ?imdbId
  }
  ?episode p:P179 ?statement .
  ?statement pq:P1545 ?episodeNumber .
}
ORDER BY ASC ( ?series ) ASC ( xsd:integer ( ?episodeNumber ) )

What are all the episodes of How I Met Your Mother, in order, along with their IMDb IDs and which two-part story arcs they belong to?

Please provide a complete ordered list of all How I Met Your Mother episodes, showing their season position, IMDb identifier, and whether they are part of a multi-episode story arc.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label ?var4 ?var5 ?var6 ?var7 ?var8 ?var9 WHERE { ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q21191270> . ?var3 <http://www.wikidata.org/prop/direct/P179> <http://www.wikidata.org/entity/Q147235> . OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P361> ?var2 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P1191> ?var7 . } ?var3 <http://www.wikidata.org/prop/direct/P179> ?var1 . ?var3 <http://www.wikidata.org/prop/P179> ?var10 . OPTIONAL { ?var10 <http://www.wikidata.org/prop/qualifier/P1545> ?var4 . } ?var3 <http://www.wikidata.org/prop/P361> ?var11 . OPTIONAL { ?var11 <http://www.wikidata.org/prop/qualifier/P1545> ?var5 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P345> ?var6 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P155> ?var8 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P156> ?var9 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "it,en". } } ORDER BY ASC( ?var1 )ASC( <http://www.w3.org/2001/XMLSchema#integer> ( ?var4 ) )


Question: How many seasons and episodes does Disney's Adventures of the Gummi Bears have?

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 ?seriesLabel ?numSeasons ?numEpisodes WHERE {
  wd:Q734576 rdfs:label ?seriesLabel .
  wd:Q734576 wdt:P2437 ?numSeasons .
  wd:Q734576 wdt:P1113 ?numEpisodes .
  FILTER(LANG(?seriesLabel) = 'en')
}

What is the total number of episodes and seasons for the animated series Disney's Adventures of the Gummi Bears?

Can you tell me the season count and episode count for Disney's Adventures of the Gummi Bears?

SELECT ?var1Label ?var1 ?var2 ?var2Label ?var3 ?var4 ?var3Label ?var5 ?var6 ?var7 ?var8 ?var9 ?var10 WHERE { BIND ( <http://www.wikidata.org/entity/Q734576> AS ?var2 ). ?var1 <http://www.wikidata.org/prop/direct/P361> ?var3 . ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q21191270> . ?var1 <http://www.wikidata.org/prop/P179> ?var11 . ?var11 <http://www.wikidata.org/prop/statement/P179> ?var2 . ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3464665> . ?var3 <http://www.wikidata.org/prop/P179> ?var12 . ?var12 <http://www.wikidata.org/prop/statement/P179> ?var2 . OPTIONAL { ?var12 <http://www.wikidata.org/prop/qualifier/P1545> ?var4 . } OPTIONAL { ?var11 <http://www.wikidata.org/prop/qualifier/P1545> ?var5 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P2364> ?var6 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P155> ?var7 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P156> ?var8 . } OPTIONAL { ?var2 <http://www.wikidata.org/prop/direct/P2437> ?var10 . } OPTIONAL { ?var3 <http://www.wikidata.org/prop/direct/P1113> ?var9 . } SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } } ORDER BY ASC( <http://www.w3.org/2001/XMLSchema#integer> ( ?var4 ) )ASC( <http://www.w3.org/2001/XMLSchema#integer> ( ?var5 ) )ASC( ?var6 )


Question: IMDb IDs and occupations of American humans

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?imdbId ?occupation WHERE {
  ?person wdt:P31 wd:Q5 ; wdt:P345 ?imdbId ; wdt:P106 ?occupation ; wdt:P27 wd:Q30 .
}

Who are U.S. citizens with IMDb profiles, and what are their occupations?

List the IMDb IDs and occupations of all humans who are citizens of the United States.

SELECT ?var1 ?var2 WHERE { ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q5> ; <http://www.wikidata.org/prop/direct/P345> ?var1 ; <http://www.wikidata.org/prop/direct/P106> ?var2 ; <http://www.wikidata.org/prop/direct/P27> <http://www.wikidata.org/entity/Q30> . }


Question: List 200 films starting from the 199,401st entry in Wikidata, showing their English titles.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?film ?filmLabel WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film rdfs:label ?filmLabel .
  FILTER(LANG(?filmLabel) = "en")
}
ORDER BY ASC(?film)
LIMIT 200
OFFSET 199400

What are the English titles of the 200 films that come after the first 199,400 films in Wikidata?

Please retrieve the next 200 films (after skipping 199,400) along with their English labels from Wikidata.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } } ORDER BY ASC( ?var1 ) LIMIT 200 OFFSET 199400


Question: List film series with their English names and Spanish Wikipedia pages.

SELECT ?filmSeries ?label ?wikipediaPage WHERE { ?filmSeries wdt:P31 wd:Q24856 . ?wikipediaPage schema:about ?filmSeries ; schema:isPartOf <https://es.wikipedia.org/> . ?filmSeries rdfs:label ?label . FILTER(LANG(?label) = "en") } LIMIT 200

What are the English names of film series and their corresponding Spanish Wikipedia articles?

Show me all film series (as defined in Wikidata) along with their English labels and links to their Spanish Wikipedia pages.

SELECT ?var1 ?var1Label ?var2 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q24856> . ?var2 <http://schema.org/about> ?var1 ; <http://schema.org/isPartOf> <https://es.wikipedia.org/> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "es,en". } } LIMIT 200


Question: What are the key details about the InterPro domain "Regulator of RNA terminal phosphate cyclase"?

PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?property ?value WHERE {
  wd:Q24721415 ?property ?value .
  FILTER(STRSTARTS(STR(?property) , "http://www.wikidata.org/prop/direct/") || STRSTARTS(STR(?property) , "http://schema.org/"))
  FILTER(! STRSTARTS(STR(?value) , "http://www.wikidata.org/entity/statement/"))
}

Can you list the name, description, InterPro ID, and classification of the protein domain Q24721415?

What does Wikidata say about the protein domain with InterPro ID IPR009715?

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


Question: What are the atomic masses of all chemical elements, listed in order of atomic number?

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?elementLabel ?massAmount WHERE {
  ?element wdt:P31 wd:Q11344 .
  ?element wdt:P1086 ?atomicNumber .
  ?element p:P2067 ?massStatement .
  ?massStatement ps:P2067 ?massAmount .
  ?element rdfs:label ?elementLabel .
  FILTER ( LANG( ?elementLabel ) = "en" )
}
ORDER BY ASC ( ?atomicNumber )

Can you list the chemical elements along with their standard atomic weights?

Show me the names and masses of chemical elements, sorted by their atomic number.

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


Question: What are the chemical identifiers and drug database IDs for dabrafenib mesylate?

SELECT ?var1 ?var1Label ?var2 ?var3 ?var3Label WHERE {
  VALUES (?var1) { (wd:Q27145089) }
  VALUES (?var2) {
    (wdt:P274) (wdt:P231) (wdt:P233) (wdt:P234) (wdt:P235) (wdt:P715) (wdt:P662) (wdt:P592) (wdt:P665) (wdt:P683) (wdt:P652) (wdt:P2892) (wdt:P3345) (wdt:P486) (wdt:P2275) (wdt:P2175) (wdt:P3776) (skos:altLabel)
  }
  ?var1 ?var2 ?var3 .
  OPTIONAL { ?var1 rdfs:label ?var1Label . FILTER(LANG(?var1Label) = "en") }
  OPTIONAL { ?var3 rdfs:label ?var3Label . FILTER(LANG(?var3Label) = "en") }
}

Can you list the CAS number, PubChem ID, DrugBank ID, and alternative names for the drug dabrafenib mesylate?

Show me all known identifiers and alternative names for the chemical compound dabrafenib mesylate, including its InChI, UNII, and ChEBI ID.

SELECT ?var1 ?var1Label ?var2 ?var3 ?var3Label WHERE { VALUES ( ?var1 ) { ( <http://www.wikidata.org/entity/Q27145089> ) } 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: Music singles named "Alive" with their performers and genres

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 ?single ?singleLabel ?performerLabel ?genreLabel ?imageFile WHERE {
  ?single wdt:P31 wd:Q134556 ; rdfs:label ?singleLabel .
  FILTER(STRSTARTS(LCASE(?singleLabel) , "alive"))
  OPTIONAL {
    ?single wdt:P175 ?performer .
    ?performer rdfs:label ?performerLabel .
    FILTER(LANG(?performerLabel) = "en")
  }
  OPTIONAL {
    ?single wdt:P136 ?genre .
    ?genre rdfs:label ?genreLabel .
    FILTER(LANG(?genreLabel) = "en")
  }
  OPTIONAL {
    ?single wdt:P18 ?imageFile .
  }
}
LIMIT 10

What are the music singles titled "Alive", who performed them, and what genres do they belong to?

Show me all music singles starting with "Alive", along with their English-language performers and genres.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3Label ?var4Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q134556> ; <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . ?var1 <http://www.wikidata.org/prop/direct/P175> ?var2 . ?var1 <http://www.wikidata.org/prop/direct/P136> ?var3 . ?var2 <http://www.wikidata.org/prop/direct/P18> ?var4 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( STRSTARTS ( ?var1Label , "Alive" ) ) ) . } GROUP BY ?var1 ?var1Label ?var2Label ?var3Label ?var4Label LIMIT 10


Question: What is the genre and release date of Katy Perry's song "Birthday"?

SELECT DISTINCT ?single ?genre ?genreLabel ?publicationDate WHERE { ?single wdt:P31 wd:Q134556 ; rdfs:label "Birthday"@en ; wdt:P175 wd:Q42493 ; wdt:P577 ?publicationDate . OPTIONAL { ?single wdt:P136 ?genre . ?genre rdfs:label ?genreLabel . FILTER(LANG(?genreLabel) = "en") } }

Can you tell me when Katy Perry released her single titled "Birthday" and what genre it is?

Show me the publication date and musical genre of the music single "Birthday" performed by Katy Perry.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3 ?var3Label ?var4 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/P31> <http://www.wikidata.org/entity/Q134556> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P175> ?var2 . ?var2 <http://www.w3.org/2000/01/rdf-schema#label> ?var2Label . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P136> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P577> ?var4 . } FILTER ( ( REGEX ( ?var1Label , "^Birthday$", "i" ) ) ) . FILTER ( ( REGEX ( ?var2Label , "Katy Perry", "i" ) ) ) . } LIMIT 10


Question: What are the occupation and associated fields of work for Albert Einstein?

SELECT ?propertyLabel ?valueLabel ?qualifierLabel WHERE { wd:Q937 p:P106 ?statement . ?statement ps:P106 ?value . ?statement pq:P101 ?qualifier . wd:P106 rdfs:label ?propertyLabel . ?value rdfs:label ?valueLabel . ?qualifier rdfs:label ?qualifierLabel . FILTER(LANG(?propertyLabel) = "en") FILTER(LANG(?valueLabel) = "en") FILTER(LANG(?qualifierLabel) = "en") }

Show me the property, value, and qualifiers for Albert Einstein’s occupation in Wikidata.

Which fields of work are associated with Albert Einstein’s occupation as a theoretical physicist?


Question: What entity and property does the statement s:Q17709715-CE89BECB-70AC-4F58-BAC7-DDBABFC37DEC refer to?

SELECT ?entity ?property WHERE { ?entity ?property s:Q17709715-CE89BECB-70AC-4F58-BAC7-DDBABFC37DEC . }

Which gene and RefSeq RNA ID statement is identified by this statement ID?

Find the subject and property linked to the given Wikidata statement.

SELECT ?var1 ?var2 WHERE { ?var1 ?var2 <http://www.wikidata.org/entity/statement/Q17709715-CE89BECB-70AC-4F58-BAC7-DDBABFC37DEC> . }


Question: What are the direct properties linking "history of Sweden" to other entities, and what are those entities?

SELECT DISTINCT ?subjectLabel ?property ?object ?objectLabel WHERE { wd:Q201350 ?directProperty ?object . ?property wikibase:directClaim ?directProperty . ?property rdf:type wikibase:Property . ?object rdfs:label ?objectLabel . wd:Q201350 rdfs:label ?subjectLabel . FILTER (LANG(?objectLabel) = "en") . FILTER (LANG(?subjectLabel) = "en") . FILTER (?property != wd:P1963) . } LIMIT 20

List the objects associated with the history of Sweden through direct properties, excluding "has part", and show their English labels.

Which entities are connected to the history of Sweden via direct Wikidata properties, and what are those properties?

SELECT ?var1Label ?var2 ?var2Label ?var3 ?var3Label WHERE { <http://www.wikidata.org/entity/Q201350> ?var4 ?var3 . ?var2 ?var5 ?var4 . ?var2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://wikiba.se/ontology#Property> . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var3Label . <http://www.wikidata.org/entity/Q201350> <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en". } FILTER ( ( ( LANG ( ?var3Label ) = "en" ) ) ) . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . FILTER ( ( ( ?var4 != <http://www.wikidata.org/prop/direct/P1963> ) ) ) . } LIMIT 20


Question: What are the sister city pairs in Wikidata?

SELECT ?city1 ?city2 WHERE { ?city1 wdt:P190 ?city2 . }

Which cities are sister cities to each other?

List all pairs of cities that have a sister city relationship.

SELECT ?var1 ?var2 WHERE { ?var1 <https://query.wikidata.org/bigdata/namespace/wdq/P190> ?var2 . }


Question: Most common property used to classify items as jazz on Wikidata

SELECT ?property (COUNT(?property) AS ?count)
WHERE {
  ?item ?propertyUsed wd:Q8341 .
  ?property wikibase:directClaim ?propertyUsed .
  ?property a wikibase:Property .
}
GROUP BY ?property
ORDER BY DESC(?count)
LIMIT 1

What property is used most often to assign jazz as a genre to items in Wikidata?

Show me the property that links the most items to the jazz genre.

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


Question: Items associated with country music and the properties used to link them, excluding "instance of".

SELECT ?item ?statement ?property (SAMPLE(?qValue) AS ?qualifierValue)
WHERE {
  {
    SELECT DISTINCT ?item ?statement ?property WHERE {
      ?statement ?statementProperty wd:Q83440 .
      ?item ?claim ?statement .
      ?property wikibase:statementProperty ?statementProperty .
      ?property wikibase:claim ?claim .
      FILTER (?property != wd:P31)
    }
    LIMIT 101
  }
  OPTIONAL {
    ?property wikibase:qualifier ?qualifier .
    ?statement ?qualifier ?qValue .
  }
}
GROUP BY ?item ?statement ?property

Which artists or works are linked to country music through properties other than "instance of", and what are those properties?

List up to 101 items connected to country music via non-instance-of properties, along with the property used and any associated qualifiers.

SELECT ?var1 ?var2 ?var3 ( SAMPLE ( ?var4 ) AS ?var5 ) WHERE { { SELECT DISTINCT ?var1 ?var2 ?var3 WHERE { ?var2 ?var6 <http://www.wikidata.org/entity/Q83440> . ?var1 ?var7 ?var2 . ?var3 <http://wikiba.se/ontology#statementProperty> ?var6 . ?var3 <http://wikiba.se/ontology#claim> ?var7 . FILTER ( ( ( ?var3 != <http://www.wikidata.org/entity/P31> ) ) ) . } LIMIT 101 } OPTIONAL { ?var2 ?var4 ?var8 . ?var9 <http://wikiba.se/ontology#qualifier> ?var4 . } } GROUP BY ?var1 ?var2 ?var3


Question: List 200 films starting from the 175,601st film in Wikidata, showing their English titles.

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 ?film ?filmLabel WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film rdfs:label ?filmLabel .
  FILTER ( LANG( ?filmLabel ) = "en" )
}
ORDER BY ASC ( ?film )
LIMIT 200
OFFSET 175600

What are the English titles of the 200 films that come after the first 175,600 films in Wikidata?

Please retrieve the next 200 films after skipping the first 175,600, along with their English titles, from Wikidata.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } } ORDER BY ASC( ?var1 ) LIMIT 200 OFFSET 175600


Question: What is the most specific category that both Amazon and the Space Coast belong to?

SELECT DISTINCT ?common WHERE { wd:Q2920489 wdt:P31 ?type1 . wd:Q3884 wdt:P31 ?type2 . ?type1 wdt:P279* ?common . ?type2 wdt:P279* ?common . } ORDER BY ?common

What do Amazon and the Space Coast have in common in terms of their classification in Wikidata?

Find the shared superclass in the hierarchy between the entity type of Amazon and the entity type of the Space Coast region.

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/Q2920489> ; <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/Q3884> ; <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 subclasses of audiovisual work?

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:Q2431196 .
  ?subclass rdfs:label ?subclassLabel .
  FILTER(LANG(?subclassLabel) = "en")
}

What types of media are considered subclasses of audiovisual work, such as video games or podcast series seasons?

List the English labels of all items that are subclasses of audiovisual work.

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


Question: List English-named musical groups and their members.

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 ?groupName ?member WHERE {
  ?group wdt:P31 wd:Q215380 .
  ?group rdfs:label ?groupName .
  ?member wdt:P463 ?group .
  FILTER(LANG(?groupName) = "en")
}
ORDER BY ASC(?groupName)
LIMIT 100

Which musical groups have English names, and who are their members?

Show me up to 100 musical groups in English along with the people who are members of each group, sorted alphabetically by group name.

SELECT ?var1 ?var2 WHERE { ?var3 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q215380> . ?var3 <http://www.w3.org/2000/01/rdf-schema#label> ?var1 . ?var2 <http://www.wikidata.org/prop/direct/P463> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } FILTER ( ( ( LANG ( ?var1 ) = "en" ) ) ) . } ORDER BY ASC( ?var1 ) LIMIT 100


Question: What properties link the music genre Eurobeat to other entities, and what are the labels of those entities?

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

For Eurobeat, list each property (in English) that connects it to another entity, along with the English name of that entity and how many such connections exist.

Show me the English labels of properties and their entity values for Eurobeat, grouped by property.

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


Question: Films that are instances of cinematic works, starting from the 91,401st film, with English titles.

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 ?film ?filmLabel WHERE {
  ?film wdt:P31 wd:Q11424 .
  ?film rdfs:label ?filmLabel .
  FILTER ( LANG( ?filmLabel ) = "en" )
}
ORDER BY ASC ( ?film )
LIMIT 200
OFFSET 91400

What are the English titles of films starting from the 91,401st entry in Wikidata?

List 200 English-labeled films, skipping the first 91,400 films in Wikidata.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q11424> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "[AUTO_LANGUAGE],en". } } ORDER BY ASC( ?var1 ) LIMIT 200 OFFSET 91400


Question: What are the chromosomes and their RefSeq genome IDs in Wikidata?

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 ?chromosome ?refseqId ?chromosomeLabel WHERE {
  ?chromosome wdt:P31 wd:Q37748 .
  ?chromosome wdt:P2249 ?refseqId .
  ?chromosome rdfs:label ?chromosomeLabel .
  FILTER(LANG(?chromosomeLabel) = "en")
}
LIMIT 10

List the English-labeled chromosomes along with their RefSeq identifiers.

Show me the RefSeq IDs for human and other species' chromosomes, along with their names.

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


Question: Genomic annotations and their corresponding genome assemblies

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?annotation ?assembly WHERE {
  ?annotation wdt:P659 ?assembly .
}

Which genome assemblies are used by which genomic annotations?

List all genomic annotations along with the genome assembly they are placed on.

SELECT DISTINCT * WHERE { ?var1 <http://www.wikidata.org/prop/direct/P659> ?var2 . }


Question: Seasons of 30 Rock with their season numbers, ordered by number.

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?season ?seasonNumber WHERE {
  ?season wdt:P31 wd:Q3464665 .
  ?season p:P179 ?statement .
  ?statement ps:P179 wd:Q189350 .
  OPTIONAL {
    ?statement pq:P1545 ?seasonNumber .
  }
}
ORDER BY ASC ( ?seasonNumber )

What are the season numbers for each season of the TV series 30 Rock?

List all seasons of 30 Rock along with their ordinal numbers, sorted from first to last.

SELECT ?var1 ?var2 ?var3 ?var4 WHERE { ?var1 <http://www.wikidata.org/prop/direct/P361> ?var2 . ?var1 <http://www.wikidata.org/prop/P179> ?var5 . ?var2 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q3464665> . ?var2 <http://www.wikidata.org/prop/P179> ?var6 . ?var6 <http://www.wikidata.org/prop/statement/P179> <http://www.wikidata.org/entity/Q189350> . OPTIONAL { ?var6 <http://www.wikidata.org/prop/qualifier/P1545> ?var3 . ?var5 <http://www.wikidata.org/prop/qualifier/P1545> ?var4 . } } ORDER BY ASC( ?var3 )


Question: Drugs starting with "aspirin" and their Wikidata IDs

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 ?drug ?label(REPLACE(STR(?drug) , ".*Q" , "Q") AS ?qId) WHERE {
  ?drug(wdt:P31 / wdt:P279 *) wd:Q8386 .
  ?drug rdfs:label ?label .
  FILTER(LANG(?label) = "en")
  FILTER(STRSTARTS(LCASE(?label) , "aspirin"))
}
LIMIT 15

What are the English-labeled drugs in Wikidata that start with "aspirin", and what are their Q-IDs?

List all drugs (including subclasses) with English labels beginning with "aspirin", along with their cleaned Wikidata entity IDs.

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 ( "asdf" ) ) ) ) . } LIMIT 15


Question: What is the most specific category that both Dallas and Likud belong to?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?common ?commonLabel WHERE {
  wd:Q16557 wdt:P31 ?class1 .
  wd:Q187009 wdt:P31 ?class2 .
  ?class1 wdt:P279 * ?common .
  ?class2 wdt:P279 * ?common .
  ?common rdfs:label ?commonLabel .
  FILTER ( LANG( ?commonLabel ) = "en" )
}
ORDER BY ?commonLabel
LIMIT 10

What do Dallas and Likud have in common in terms of their classification in Wikidata?

What is the highest-level concept that includes both the city of Dallas and the Likud political party?

SELECT ?var1 ( ( ?var2 + ?var3 ) AS ?var4 ) WHERE { SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q16557> ; <http://www.bigdata.com/rdf/gas#traversalDirection> "Forward"; <http://www.bigdata.com/rdf/gas#out> ?var1 ; <http://www.bigdata.com/rdf/gas#out1> ?var2 ; <http://www.bigdata.com/rdf/gas#maxIterations> "10"^^<http://www.w3.org/2001/XMLSchema#integer> ; <http://www.bigdata.com/rdf/gas#linkType> <http://www.wikidata.org/prop/direct/P279> . } SERVICE <http://www.bigdata.com/rdf/gas#service> { <http://www.bigdata.com/rdf/gas#program> <http://www.bigdata.com/rdf/gas#gasClass> "com.bigdata.rdf.graph.analytics.SSSP"; <http://www.bigdata.com/rdf/gas#in> <http://www.wikidata.org/entity/Q187009> ; <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: Music genres that are subtypes of other music genres, with their parent categories.

SELECT ?genre ?genreLabel ?parentGenre ?parentGenreLabel WHERE { ?genre wdt:P31 wd:Q188451 ; wdt:P279 ?parentGenre . ?genre rdfs:label ?genreLabel . ?parentGenre rdfs:label ?parentGenreLabel . FILTER(LANG(?genreLabel) = "en") FILTER(LANG(?parentGenreLabel) = "en") }

Which music genres are subclasses of other music genres, and what are their broader categories?

List music genres along with the genre they belong to as a subclass, using English labels.

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


Question: Metadata of the statement asserting scrotal cancer has NCI Thesaurus ID C3560

PREFIX s: <http://www.wikidata.org/entity/statement/>
SELECT ?predicate ?object WHERE {
  s:Q2936206-5DF570AB-874C-4F29-A233-CAB97F1009DE ?predicate ?object .
}

What are the properties and values of the statement that links scrotal cancer to the NCI Thesaurus ID C3560?

Show all information stored about the statement that assigns the NCI Thesaurus ID C3560 to scrotal cancer.

SELECT ?var1 ?var2 WHERE { <http://www.wikidata.org/entity/statement/Q2936206-5DF570AB-874C-4F29-A233-CAB97F1009DE> ?var1 ?var2 . }


Question: What are the direct subclasses of pharmaceutical product?

SELECT DISTINCT ?subclass ?subclassLabel ?targetLabel WHERE { VALUES ?target { wd:Q28885102 } ?subclass wdt:P279 ?target . ?subclass rdfs:label ?subclassLabel . ?target rdfs:label ?targetLabel . FILTER(LANG(?subclassLabel) = "en") FILTER(LANG(?targetLabel) = "en") }

List all types of pharmaceutical products, such as radiopharmaceuticals and fixed combinations.

Show me the English-labeled direct subclasses of the pharmaceutical product class.

SELECT DISTINCT ?var1 ?var1Label ?var2Label ?var3Label WHERE { VALUES ( ?var3 ) { ( <http://www.wikidata.org/entity/Q28885102> ) } ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) ?var3 . 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,en". } }


Question: What songs and albums were performed by The Beatles?

SELECT ?work ?workLabel WHERE { ?work wdt:P175 ?performer . ?performer rdfs:label ?performerLabel . ?work rdfs:label ?workLabel . FILTER (LANG(?performerLabel) = "en" && ?performerLabel = "The Beatles"@en) FILTER (LANG(?workLabel) = "en") }

Which creative works have The Beatles as performers, and what are their English titles?

List the English titles of all musical works performed by The Beatles.

SELECT ?var1 ?var1Label WHERE { ?var1 <http://www.wikidata.org/prop/direct/P175> "string1"@en . FILTER ( ( ( LANG ( ?var1Label ) = "en" ) ) ) . }


Question: Roads in Sweden

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 ?road ?roadLabel WHERE {
  ?road wdt:P31 wd:Q34442 .
  ?road wdt:P17 wd:Q34 .
  ?road rdfs:label ?roadLabel .
  FILTER(LANG(?roadLabel) = "en")
}

What are the names of all roads in Sweden?

List all roads in Sweden along with their English labels.

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


Question: Top scientific journals publishing research on Zika virus and its subclasses.

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(COUNT(?work) AS ?count) ?publication ?publicationLabel WHERE {
  ?work wdt:P921 ?topic .
  ?topic wdt:P279 * wd:Q202864 .
  ?work wdt:P1433 ?publication .
  ?publication rdfs:label ?publicationLabel .
  FILTER(LANG(?publicationLabel) = "en")
}
GROUP BY ?publication ?publicationLabel
ORDER BY DESC(?count)

Which journals have published the most research articles about the Zika virus or related viral species?

List the journals that have published the most papers on Zika virus, ordered by publication count, including studies on its subclasses.

SELECT( COUNT ( ?var1 ) AS ?var2 ) ?var3 ?var3Label WHERE { { ?var1 ( <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/Q202864> . } UNION { ?var1 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P361> +) <http://www.wikidata.org/entity/Q202864> . } UNION { ?var1 ( <http://www.wikidata.org/prop/direct/P921> / <http://www.wikidata.org/prop/direct/P1269> +) <http://www.wikidata.org/entity/Q202864> . } ?var1 <http://www.wikidata.org/prop/direct/P1433> ?var3 . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,fr,de,ru,es,zh,jp". } } GROUP BY ?var3 ?var3Label ORDER BY DESC( ?var2 )


Question: List of songs and albums performed by Linkin Park.

SELECT ?work WHERE { ?work wdt:P175 wd:Q261 . } LIMIT 100

What musical works have Linkin Park performed?

Show me all the creative works associated with Linkin Park as the performer.

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


Question: What are the external database identifiers for Benzo[a]pyrene-7,8-diol, including PubChem, ChemSpider, KEGG, ChEBI, and DSSTOX?

SELECT ?label ?description ?pubchem ?chemspider ?kegg ?chebi ?dsstox WHERE { wd:Q26840851 rdfs:label ?label . FILTER(LANG(?label) = "en") . wd:Q26840851 schema:description ?description . FILTER(LANG(?description) = "en") . wd:Q26840851 wdt:P662 ?pubchem . wd:Q26840851 wdt:P661 ?chemspider . wd:Q26840851 wdt:P665 ?kegg . wd:Q26840851 wdt:P683 ?chebi . wd:Q26840851 wdt:P8494 ?dsstox .}

What is the PubChem CID, ChemSpider ID, KEGG ID, ChEBI ID, and DSSTOX identifier for the chemical compound Benzo[a]pyrene-7,8-diol?

Show me the English description and all known external IDs (PubChem, ChemSpider, KEGG, ChEBI, DSSTOX) for Benzo[a]pyrene-7,8-diol.

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


Question: List drugs whose English names start with 'aspirin'.

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

What are the drugs that are subclasses of 'drug' and have an English label starting with 'aspirin'?

Show me all drugs related to aspirin, including combinations, with their English names.

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 ( "asfsdfs" ) ) ) ) . } LIMIT 15


Question: What is the PubChem CID for potassium bromate?

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?pubchemId WHERE {
  wd:Q409241 wdt:P662 ?pubchemId .
}

Can you find the external chemical identifier (PubChem) for potassium bromate?

Which PubChem database entry corresponds to the chemical compound potassium bromate?

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


Question: Academic articles citing the study on Asian lineage Zika virus imported to China.

SELECT ?citingArticle WHERE { ?citingArticle wdt:P2860 wd:Q23308156 . } LIMIT 10000

Which papers cite the research on the isolation and genomic characterization of the Asian lineage Zika virus in China?

List all scholarly works that reference the paper on the Asian lineage Zika virus imported to China.

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


Question: Television episodes that are also classified as television series

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 ?episodeOrSeries ?episodeOrSeriesLabel WHERE {
  ?episodeOrSeries wdt:P31 wd:Q21191270 .
  ?episodeOrSeries wdt:P31 wd:Q5398426 .
  ?episodeOrSeries rdfs:label ?episodeOrSeriesLabel .
  FILTER ( LANG( ?episodeOrSeriesLabel ) = "en" )
}
LIMIT 100

Which TV episodes are also considered standalone television series?

List TV specials that are labeled both as episodes and as series.

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


Question: What are the English names of drugs and their corresponding Wikidata IDs?

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?drug ?label ( REPLACE( STR( ?drug ) , ".*Q" , "Q" ) AS ?qnumber ) WHERE {
  ?drug ( wdt:P31 / wdt:P279 * ) wd:Q8386 .
  ?drug rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" )
}
ORDER BY ?label
LIMIT 20

Can you list all known drugs and their subclasses in English, along with their Q-numbers?

Show me the English labels of all substances classified as drugs in Wikidata, and extract their entity IDs.

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 ( "qweqwewqe" ) ) ) ) . } LIMIT 15


Question: List the first, second, and third ionization energies of chemical elements with their units and atomic numbers.

SELECT ?element ?elementLabel ?ionizationValue ?unit ?ordinal ?atomicNumber WHERE { ?element wdt:P31 wd:Q11344 ; wdt:P1086 ?atomicNumber . ?element p:P2260 ?stmt . ?stmt ps:P2260 ?ionizationValue ; pq:P1545 ?ordinal ; psv:P2260 ?valueNode . ?valueNode wikibase:quantityUnit ?unit . ?element rdfs:label ?elementLabel . FILTER(LANG(?elementLabel) = "en") } ORDER BY ASC(?atomicNumber)

What are the ionization energies (1st, 2nd, 3rd, etc.) of chemical elements, in what units are they measured, and what are their atomic numbers?

Show me the ionization energy values for each chemical element, including the energy level (1st, 2nd, etc.), the unit (kJ/mol or eV), and the atomic number, sorted by atomic number.

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


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

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?element ?elementLabel ?ionizationEnergy ?ionizationOrder ?atomicNumber WHERE {
  ?element wdt:P31 wd:Q11344 ; wdt:P1086 ?atomicNumber .
  ?element p:P2260 ?ionizationStatement .
  ?ionizationStatement ps:P2260 ?ionizationEnergy ; pq:P1545 ?ionizationOrder .
  ?element rdfs:label ?elementLabel .
  FILTER ( LANG( ?elementLabel ) = "en" )
}
ORDER BY ASC ( ?atomicNumber )

What are the first, second, and subsequent ionization energies for each chemical element, and what is their atomic number?

Show me the ionization energies (with order: 1st, 2nd, etc.) for all chemical elements, along with their atomic numbers, sorted from lowest to highest atomic number.

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


Question: Lists with main topic television station and their qualifiers

SELECT ?list ?statement ?qualifierProperty WHERE { ?list p:P360 ?statement . ?statement ps:P360 wd:Q1616075 . OPTIONAL { ?statement ?qualifierProperty ?value . wd:P360 wikibase:qualifierProperty ?qualifierProperty . } } LIMIT 101

What lists have television station as their main topic, and what qualifiers are used on those lists?

Show me up to 101 lists that list television stations as their main topic, along with any qualifier properties used on those list statements.

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


Question: What are music albums and the birth names or stage names of their performers?

SELECT DISTINCT ?album ?albumLabel ?birthName ?pseudonym ?releaseDate WHERE { ?album wdt:P31 wd:Q11424 . ?album rdfs:label ?albumLabel . FILTER(LANG(?albumLabel) = "en") ?album wdt:P175 ?performer . OPTIONAL { ?performer wdt:P1477 ?birthName . } OPTIONAL { ?performer wdt:P742 ?pseudonym . } OPTIONAL { ?album wdt:P571 ?releaseDate . } } LIMIT 10

Can you list music albums along with the real names and aliases of the artists who made them?

Show me albums with their release dates and the birth names or professional names of the musicians behind them.

SELECT DISTINCT ?var1 ?var1Label ?var2 ?var2Label ?var3Label ?var4Label ?var5 WHERE { SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "en,en". } ?var1 <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q16010345> . ?var1 <http://www.w3.org/2000/01/rdf-schema#label> ?var1Label . OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P571> ?var5 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P136> ?var2 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P742> ?var3 . } OPTIONAL { ?var1 <http://www.wikidata.org/prop/direct/P1477> ?var4 . } }


Question: List albums with their Tidal ID identifiers.

SELECT ?album ?albumLabel ?tidalId WHERE { ?album wdt:P4577 ?tidalId . ?album rdfs:label ?albumLabel . FILTER(LANG(?albumLabel) = "en") } LIMIT 1000

What are the English titles of albums and their corresponding Tidal IDs?

Can you provide a list of albums in English along with their Tidal music platform IDs?

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


Question: What are the Swedish heritage sites designated as listed building complexes that are also human settlements?

SELECT ?site ?siteLabel WHERE { { ?site wdt:P1435 wd:Q24284072 . } UNION { ?site wdt:P1435 wd:Q24284071 . } UNION { ?site wdt:P1435 wd:Q24284073 . } ?site (wdt:P31/wdt:P279*) wd:Q486972 . OPTIONAL { ?site rdfs:label ?siteLabel . FILTER(LANG(?siteLabel) = "en") } }

List English-named cultural sites in Sweden that have been officially protected as individual, governmental, or ecclesiastical building complexes.

Which inhabited places in Sweden are recognized as heritage sites under the three types of listed building complexes?

SELECT ?var1 ?var1Label WHERE { { ?var1 <http://www.wikidata.org/prop/direct/P1435> <http://www.wikidata.org/entity/Q24284072> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P1435> <http://www.wikidata.org/entity/Q24284071> . } UNION { ?var1 <http://www.wikidata.org/prop/direct/P1435> <http://www.wikidata.org/entity/Q24284073> . } ?var1 ( <http://www.wikidata.org/prop/direct/P31> / <http://www.wikidata.org/prop/direct/P279> *) <http://www.wikidata.org/entity/Q486972> . SERVICE <http://wikiba.se/ontology#label> { <http://www.bigdata.com/rdf#serviceParam> <http://wikiba.se/ontology#language> "sv". } }