query-b4da7a6c9bd907feec078a7b057589da
Get the dataSo I have asked nicely and received an API key for Lisen Notes but before I dive in, I want to do as much as I can offline so downloaded a snapshot of their database from 2017 as a CSV and have loaded it into a SQLite database. Listennotes uniqueID is a UUID and so I want to find a simple way to link that with existing wikidata so will start with using any apple podcast ids in there as its a nice simple number. So first things thing first, some SPARQL to get all the records that have the type podcast, an apple id but not a lstennotes ID
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SSELECT DISTINCT ?item ?itemLabel ?Spotify_show_ID ?Apple_Podcasts_podcast_ID WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
{
SELECT DISTINCT ?item WHERE {
?item p:P31 ?statement0.
?statement0 (ps:P31/(wdt:P279*)) wd:Q24634210.
MINUS {
?item p:P10213 ?statement1.
?statement1 ps:P10213 _:anyValueP10213.
}
}
}
OPTIONAL { ?item wdt:P5916 ?Spotify_show_ID. }
OPTIONAL { ?item wdt:P5842 ?Apple_Podcasts_podcast_ID. }
}