Skip to content

Instantly share code, notes, and snippets.

@ewg118
Last active November 2, 2017 13:20
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/55c1539c624c095599d4 to your computer and use it in GitHub Desktop.
Save ewg118/55c1539c624c095599d4 to your computer and use it in GitHub Desktop.
SPARQL query to get coins with Price numbers from the British Museum endpoint.
PREFIX bmo: <http://www.researchspace.org/ontology/>
PREFIX ecrm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?regno ?ref WHERE {
?s crm:P70i_is_documented_in <http://collection.britishmuseum.org/id/bibliography/3364> ;
crm:P1_is_identified_by ?d1 .
?d1 crm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/identifier/cmcatno> ;
rdfs:label ?ref FILTER regex(str(?ref), "GC30")
?s crm:P1_is_identified_by ?d2 .
?d2 crm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/identifier/regno>;
rdfs:label ?regno .
?s bmo:PX_display_wrap ?text . FILTER regex(?text, "Price\\s1991\\sP?[0-9]")
} ORDER BY ?ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment