Basic introduction to querying Wikidata with SPARQL. Presented at a plenary session of Wikipedia Day 15 at Tisch School of the Arts in New York University. Released into the public domain under CC0 1.0.
RDF l l W3C standard, like HTML l l “Trying to use the Semantic Web without SPARQL l is like trying to use a relational database without SQL.” l – Tim Berners-Lee
wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?object WHERE { wd:Q84 wdt:P1082 ?object } The wd: and wdt: represent different namespaces
wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?object WHERE { wd:Q84 wdt:P1082 ?object } London population
wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?object WHERE { wd:Q84 wdt:P1082 ?object } “Return the value of London's population”