I want to search "Star Wars" across both TV series (http://www.wikidata.org/entity/Q5398426
) and films (http://www.wikidata.org/entity/Q11424
). The following SPARQL is for searching movies:
# search movies by name
SELECT DISTINCT ?item ?name WHERE {
?item wdt:P31 wd:Q11424.
?item rdfs:label ?queryByTitle.
OPTIONAL { ?item wdt:P1476 ?name. }
#FILTER(REGEX(?queryByTitle, "star wars", "i"))
FILTER(contains(lcase(?queryByTitle), "star wars"))
}
LIMIT 100
Any idea how I can search by TV Series as well?
?item wdt:P31 wd:Q11424.
withVALUES ?type {wd:Q5398426 wd:Q11424} ?item wdt:P31 ?type .
- UninformedUser