query-25207aef456353f3adb7a5c41200d10c

rq turtle/ttl

Propertiestitle (P1476)

Use at

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 bd: <http://www.bigdata.com/rdf#>
SELECT 
  DISTINCT
  ?item ?title

WHERE {
  hint:Query hint:optimizer "None".

{  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch ""why" the haswbstatement:P31=Q13442814".
      ?page_title wikibase:apiOutput mwapi:title.
  }
 }
UNION
{  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch ""why" -the haswbstatement:P31=Q13442814".
      ?page_title wikibase:apiOutput mwapi:title.
  }
 }
  BIND(IRI(CONCAT(STR(wd:), ?page_title)) AS ?item)

  ?item wdt:P1476 ?title.
  FILTER REGEX(LCASE(?title), "why").
  FILTER REGEX(LCASE(?title), "\\?").
  FILTER REGEX(LCASE(?title), "invasi(on|ve)").

}

Query found at