query-422dda3b66e6bf2527f418f2fea667a6

rq turtle/ttl

title: P10467 find some value SELECT distinct ?item ?itemLabel (sample(?www_) AS ?www) WHERE { ?item wdt:P10467 ?value . FILTER (wikibase:isSomeValue(?value)) OPTIONAL {?item wdt:P856 ?www_ . FILTER (!wikibase:isSomeValue(?www_)) } # need to just show when it has a value SERVICE wikibase:label { bd:serviceParam wikibase:language "en,sv" } } group by ?item ?itemLabel order by ?itemLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: P10467 find some value
SELECT distinct ?item ?itemLabel (sample(?www_) AS ?www)
WHERE
{
  ?item wdt:P10467 ?value .
  FILTER (wikibase:isSomeValue(?value))
  OPTIONAL {?item wdt:P856 ?www_ .   FILTER (!wikibase:isSomeValue(?www_)) } # need to just show when it has a value
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,sv" }
} group by ?item ?itemLabel  order by ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?item"):::projected v1("?itemLabel"):::projected v2("?value") v5("?www") v3("?www_"):::projected c4(["bd:serviceParam"]):::iri c6(["en,sv"]):::literal f0[["http://wikiba.se/ontology#isSomeValue(?value)"]] f0 --> v2 v4 --"wdt:P10467"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P856".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end bind2[/"sample(?www_)"/] v3 --o bind2 bind2 --as--o v5