query-51381d4bca0cf26b0c85ccd89cf4b9ee
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?familyname ?familynameLabel
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Search";
wikibase:endpoint "www.wikidata.org";
mwapi:srsearch "Diodati haswbstatement:P31=Q5".
?title wikibase:apiOutput mwapi:title.
}
BIND(IRI(CONCAT(STR(wd:), ?title)) AS ?item)
?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="en")
FILTER(CONTAINS(LCASE(?itemLabel), "diodati"))
optional {?item wdt:P734 ?familyname. optional {?familyname rdfs:label ?familynameLabel. filter(lang(?familynameLabel)="en") } }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?familyname"):::projected
v4("?familynameLabel"):::projected
v3("?item"):::projected
v1("?itemLabel"):::projected
v2("?title")
c8(["www.wikidata.org"]):::literal
c10(["Diodati haswbstatement:P31=Q5"]):::literal
c4(["bd:serviceParam"]):::iri
c6(["Search"]):::literal
c12(["mwapi:title"]):::iri
f0[["contains(lower-case(?itemLabel),'diodati')"]]
f0 --> v1
f1[["?itemLabel = 'en'"]]
f1 --> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c4 --"mwapi:api"--> c6
c4 --"mwapi:endpoint"--> c8
c4 --"mwapi:srsearch"--> c10
v2 --"mwapi:apiOutput"--> c12
end
bind2[/"concat(str('wd:'),?title)"/]
v2 --o bind2
bind2 --as--o v3
v3 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P734".-> v5
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v4
end
end