Sample LinkedMusic Queries for Testing Different Stages of Production - DDMAL/linkedmusic-datalake GitHub Wiki

Benchmark Testing Queries

1. Find anything you can find via the database's website.

Query SPARQL Notes
Anything in The Session taking place in Montreal
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>


SELECT DISTINCT ?session
WHERE {
  GRAPH <https://thesession.org/> {
    ?session wdt:P276 wd:Q340 .
  }
}
LIMIT 100

2. Find anything you can find beyond what you can find on the website because you have a full access to the database.

Query SPARQL Notes
Songs in Dig That Lick recorded in New York City
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 ?trackname
WHERE {
  GRAPH <http://www.DTL.org/> {
    ?track wdt:P8546 wd:Q60 .
    ?track rdfs:label ?trackname .
  }
}
LIMIT 100
Dig That Lick only allows searching for musical patterns. It is impossible to filter by location.

3. Find anything you can find with the database plus using the information in Wikidata, e.g., the gender of the musician.

4. Find anything across different databases and Wikidata.

4.1 Across two databases

Query SPARQL Notes
Full recordings of songs with Charlie Parker as soloist
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 ?trackname ?song ?solo
WHERE {
  GRAPH <http://www.DTL.org/> {
    ?solo wdt:P175 wd:Q103767 .
    ?solo wdt:P361 ?track .
    ?track rdfs:label ?trackname .
    ?track wdt:P2888 ?trackID .
  }
  GRAPH <https://musicbrainz.org/>{
    ?song wdt:P2888 ?trackID .
  }
}
LIMIT 100
Targets MusicBrainz (recordings) and Dig That Lick (jazz solos). Caveat: you still have to look through the various recordings of each song to find the one with the target solo.

4.2 Across three or more databases

Query SPARQL Notes
Recordings of songs found in Irish and Jazz circles.
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 ?trackTitle ?track ?solo ?work
WHERE {
  GRAPH <https://thesession.org/> {
     ?track rdfs:label ?trackTitle .
  }
  GRAPH <http://www.DTL.org/> {
     ?lick rdfs:label ?trackTitle .
     ?lick wdt:P2888 ?trackID .
     ?solo wdt:P361 ?lick .
  }
  GRAPH <https://musicbrainz.org/> {
    ?work wdt:P2888 ?trackID .
 }
}
Targets MusicBrainz (recordings) and Dig That Lick (jazz) and The Session (Irish music). Caveat: due to current limitations with reconciliation, some results display different songs of the same name.

4.3 Across two or more databases and Wikidata


NLP2SPARQL

This section contains a list of sample queries that could not be done without LinkedMusic. They either query across multiple databases or offer search functionality that does not currently exist in the original database. The formulation of these queries should require no technical experience or background.

Query Notes
Give me a list of Sessions that took place in Greece. As of 16 June 2025, The Session does not support location-based queries. When you filter sessions with the keyword 'Greece,' sessions in the USA and Austria are returned as well.
Find all album cover arts for albums released in 1959 that were released by surf rock bands. Cover Art Archive + MusicBrainz (and others)
Return all Proper chants composed in Southern France that are in mixolydian mode The LLM may have to clarify the definition of 'Southern France'

⚠️ **GitHub.com Fallback** ⚠️