query-b9405af3498a441b99964d63f82a311d
Tamil films without malayalam Labels SELECT ?item ?itemLabel ?dr ?drlabel ?itemDescription ?qid (year(?year) as ?yr ) WHERE { ?item wdt:P31 wd:Q11424. ?item wdt:P364 wd:Q5885. ?item wdt:P577 ?year. ?item wdt:P57 ?dr OPTIONAL { ?item rdfs:label ?label . ?item rdfs:descriptipn ?desc . FILTER(LANG(?desc) = 'ml') . } OPTIONAL { ?dr rdfs:label ?drlabel. FILTER(LANG(?drlabel)="ml") }
FILTER(!BOUND($label)) . BIND (strafter(str(?item), str(wd:)) AS ?qid) SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' } }
Use at
- https://query.wikidata.org/sparql
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#>
# Tamil films without malayalam Labels
SELECT ?item ?itemLabel ?dr ?drlabel ?itemDescription ?qid (year(?year) as ?yr ) WHERE
{
?item wdt:P31 wd:Q11424.
?item wdt:P364 wd:Q5885.
?item wdt:P577 ?year.
?item wdt:P57 ?dr
OPTIONAL {
?item rdfs:label ?label .
?item rdfs:descriptipn ?desc .
FILTER(LANG(?desc) = 'ml') .
}
OPTIONAL { ?dr rdfs:label ?drlabel. FILTER(LANG(?drlabel)="ml") }
FILTER(!BOUND($label)) .
BIND (strafter(str(?item), str(wd:)) AS ?qid)
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?desc")
v6("?dr"):::projected
v2("?drlabel"):::projected
v4("?item"):::projected
v1("?label")
v7("?qid"):::projected
v5("?year"):::projected
v8("?yr")
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
c5(["wd:Q5885"]):::iri
c3(["wd:Q11424"]):::iri
f0[["not bound(?label)"]]
f0 --> v1
v4 --"wdt:P31"--> c3
v4 --"wdt:P364"--> c5
v4 --"wdt:P577"--> v5
v4 --"wdt:P57"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v1
v4 --"rdfs:descriptipn"--> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."rdfs:label".-> v2
end
bind1[/"substring-after(str(?item),str('wd:'))"/]
v4 --o bind1
bind1 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind2[/"year-from-dateTime(?year)"/]
v5 --o bind2
bind2 --as--o v8