query-41337a044c777a048513da5570613953

rq turtle/ttl

Quadres d'alguns museus barcelonins SELECT DISTINCT ?obra ?obraLabel ?museu ?museuLabel ?pintor ?pintorLabel WHERE { VALUES ?museu {wd:Q867072 wd:Q1050032 wd:Q1753029 wd:Q1067140 wd:Q15735772 wd:Q861252} ?obra wdt:P276|wd:P195 ?museu. ?obra wdt:P31/wdt:P279* wd:Q3305213. OPTIONAL {?obra wdt:P170 ?pintor.} SERVICE wikibase:label { bd:serviceParam wikibase:language "ca, en, es" . } } ORDER BY ?museuLabel ?pintorLabel ?obraLabel

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#>
#Quadres d'alguns museus barcelonins
SELECT DISTINCT ?obra ?obraLabel ?museu ?museuLabel ?pintor ?pintorLabel
WHERE {
  VALUES ?museu {wd:Q867072 wd:Q1050032 wd:Q1753029 wd:Q1067140 wd:Q15735772 wd:Q861252}
  ?obra wdt:P276|wd:P195 ?museu.
  ?obra wdt:P31/wdt:P279* wd:Q3305213.
  OPTIONAL {?obra wdt:P170 ?pintor.}
    SERVICE wikibase:label {
    bd:serviceParam wikibase:language "ca, en, es" .
    }
}
ORDER BY ?museuLabel ?pintorLabel ?obraLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?museu"):::projected v1("?museuLabel"):::projected v5("?obra"):::projected v3("?obraLabel"):::projected v6("?pintor"):::projected v2("?pintorLabel"):::projected a1((" ")) c10(["ca, en, es"]):::literal c5(["wd:Q3305213"]):::iri c8(["bd:serviceParam"]):::iri bind0[/VALUES ?museu/] bind0-->v4 bind00(["wd:Q867072"]) bind00 --> bind0 bind01(["wd:Q1050032"]) bind01 --> bind0 bind02(["wd:Q1753029"]) bind02 --> bind0 bind03(["wd:Q1067140"]) bind03 --> bind0 bind04(["wd:Q15735772"]) bind04 --> bind0 bind05(["wd:Q861252"]) bind05 --> bind0 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"wd:P195"--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P276"--> v4 end union0r <== or ==> union0l end v5 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P170".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end