Sample queries

From Black Bibliography Project
Revision as of 20:31, 10 November 2019 by Mc2343 (talk | contribs)
Jump to navigation Jump to search

Until we can update the Query Service to include our own sample queries, let's list those here...


Sample queries

To get an overview of what's in the BBP, the following query will return a count of all of the different instances, such as works, people, and places.

SELECT ?typeLabel (count(distinct ?x) as ?count)
WHERE
{
  ?x wdt:P8 ?type .
  ?type rdfs:label ?typeLabel.
  FILTER((LANG(?typeLabel)) = "en")
}
group by ?type ?typeLabel
order by desc(?count)

Try it out!