User:Reosarevok/Wikidata Example Queries
From MusicBrainz Wiki
Jump to navigationJump to search
These are example queries for the Wikidata SPARQL endpoint
All composers who don't have a MusicBrainz ID stored
For "musicians" instead of "composers", change Q36834 to Q639669.
SELECT ?entityLabel ?entity { ?entity wdt:P106 wd:Q36834 . MINUS { ?entity wdt:P434 [] } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }
Composers born somewhere in Germany who don't have a MusicBrainz ID stored
SELECT ?entityLabel ?entity { ?entity wdt:P106 wd:Q36834 . ?entity wdt:P19 ?place . ?place wdt:P17 wd:Q183 . MINUS { ?entity wdt:P434 [] } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }