query-59fed2df01b6f96300c2df94a29ac809

rq turtle/ttl

SELECT DISTINCT ?work ?inventory_number ?image ?inception ?instance_of ?instance_ofLabel ?collection ?collectionLabel ?creator ?creatorLabel ?idurl WHERE { SELECT DISTINCT ?work ?workLabel ?inventory_number ?idurl WHERE { ?work wdt:P195 wd:Q1948674. SERVICE wikibase:label { bd:serviceParam wikibase:language "nl". } OPTIONAL { ?work wdt:P217 ?inventory_number. } OPTIONAL { ?work wdt:P18 ?image. } OPTIONAL { ?work wdt:P571 ?inception. } OPTIONAL { ?work wdt:P31 ?instance_of. } OPTIONAL { ?work wdt:P195 ?collection. } OPTIONAL { ?work wdt:P170 ?creator. } OPTIONAL { ?work ?identifierproperty ?identifier . ?property wikibase:directClaim ?identifierproperty . ?property wikibase:propertyType wikibase:ExternalId . ?property wdt:P1630 ?formatterurl . BIND(IRI(REPLACE(?identifier, '^(.+)$', ?formatterurl)) AS ?idurl). }

} ORDER BY ?work

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#SELECT DISTINCT ?work ?inventory_number ?image ?inception ?instance_of ?instance_ofLabel ?collection ?collectionLabel ?creator ?creatorLabel ?idurl WHERE {
SELECT DISTINCT ?work ?workLabel ?inventory_number ?idurl WHERE {
  ?work wdt:P195 wd:Q1948674.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl". }
  OPTIONAL { ?work wdt:P217 ?inventory_number. }
  OPTIONAL { ?work wdt:P18 ?image. }
  OPTIONAL { ?work wdt:P571 ?inception. }
  OPTIONAL { ?work wdt:P31 ?instance_of. }
  OPTIONAL { ?work wdt:P195 ?collection. }
  OPTIONAL { ?work wdt:P170 ?creator. }
  OPTIONAL { 
      ?work ?identifierproperty ?identifier .
      ?property wikibase:directClaim ?identifierproperty .
      ?property wikibase:propertyType wikibase:ExternalId .
      ?property wdt:P1630 ?formatterurl .
      BIND(IRI(REPLACE(?identifier, '^(.+)$', ?formatterurl)) AS ?idurl).
 } 

} ORDER BY ?work

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?collection") v7("?creator") v11("?formatterurl") v9("?identifier") v8("?identifierproperty") v12("?idurl"):::projected v3("?image") v4("?inception") v5("?instance_of") v2("?inventory_number"):::projected v10("?property") v1("?work"):::projected c14(["wikibase:ExternalId"]):::iri c4(["bd:serviceParam"]):::iri c2(["wd:Q1948674"]):::iri c6(["nl"]):::literal v1 --"wdt:P195"--> c2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P217".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P571".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P31".-> v5 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P195".-> v6 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P170".-> v7 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -->v8--> v9 v10 -."wikibase:directClaim".-> v8 v10 --"wikibase:propertyType"--> c14 v10 --"wdt:P1630"--> v11 bind0[/"replace(?identifier,'^(.+)$',?formatterurl)"/] v9 --o bind0 v11 --o bind0 bind0 --as--o v12 end