Skip to content

Instantly share code, notes, and snippets.

@ewg118
Last active March 24, 2020 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewg118/ad77cf81db5f62f925491f1e6bdb8da0 to your computer and use it in GitHub Desktop.
Save ewg118/ad77cf81db5f62f925491f1e6bdb8da0 to your computer and use it in GitHub Desktop.
Get a count of each type (including subtypes) in the PELLA corpus with a photo
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?type (count(?coin) as ?count) WHERE {
?type dcterms:source|skos:exactMatch/dcterms:source nm:pella_type_series .
?coin nmo:hasTypeSeriesItem|nmo:hasTypeSeriesItem/skos:broader ?type .
{?coin nmo:hasObverse/foaf:depiction ?img}
UNION {?coin foaf:depiction ?img}
} GROUP BY ?type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment