query-43f991c660975d8bd0e836da7eed2eda

rq turtle/ttl

Little improvement to a queryHi! I have written this query

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?phi ?digilib ?treccani ?ei ?ol ?viaf
{
 { ?item wdt:P6941 ?phi . } UNION { ?item wdt:P6862 ?digilib . }
 OPTIONAL { ?item wdt:P3365 ?treccani . }
 OPTIONAL { ?item wdt:P4223 ?ei . }
 OPTIONAL { ?item wdt:P648 ?ol . }
 OPTIONAL { ?item wdt:P214 ?viaf . }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en"  }    
}
GROUP BY ?item ?itemLabel ?phi ?digilib ?treccani ?ei ?ol ?viaf
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?digilib"):::projected v6("?ei"):::projected v2("?item"):::projected v1("?itemLabel"):::projected v7("?ol"):::projected v3("?phi"):::projected v5("?treccani"):::projected v8("?viaf"):::projected c8(["bd:serviceParam"]):::iri c10(["it,en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P6862"--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P6941"--> v3 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P3365".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P4223".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P648".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P214".-> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end