query-88532a18c4bbedfa8e8bbebf653ae082

rq turtle/ttl

Trilotat

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel WHERE {
  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "inlabel:formation@en -haswbstatement:P31 -haswbstatement:P279";
                    mwapi:srlimit "max".
    ?item wikibase:apiOutputItem mwapi:title.
  }
  ?item rdfs:label ?itemLabel.
  FILTER(LANG(?itemLabel) = "en")
  FILTER(CONTAINS(LCASE(?itemLabel), "formation")) # WikibaseCirrusSearch inlabel: also searches aliases, this limits to labels only
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected c8(["www.wikidata.org"]):::literal c12(["max"]):::literal c10(["inlabel:formation@en -haswbstatement:P31 -haswbstatement:P279"]):::literal c4(["bd:serviceParam"]):::iri c6(["Search"]):::literal c14(["mwapi:title"]):::iri f0[["contains(lower-case(?itemLabel),'formation')"]] 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 c4 --"mwapi:srlimit"--> c12 v2 --"mwapi:apiOutputItem"--> c14 end v2 --"rdfs:label"--> v1