query-2bcd93033a7e5f3a6d291a3c6081a121
rq turtle/ttl
Odia film not in the Odia Wikipedia
SELECT
?item ?itemLabel ?year ?directorLabel ?composerLabel (COUNT(DISTINCT ?sitelink) AS ?sitelink)
WHERE{
?item wdt:P31 wd:Q11424 .
?item wdt:P364 wd:Q33810 .
OPTIONAL { ?item wdt:P577 ?date . BIND(YEAR(?date) as ?year) }
OPTIONAL { ?item wdt:P57 ?director }
OPTIONAL { ?item wdt:P86 ?composer }
FILTER NOT EXISTS { ?wfr schema:about ?item . ?wfr schema:inLanguage "or" }
FILTER NOT EXISTS { ?item wdt:P460 ?item2 . ?w2 schema:about ?item2 . ?w2 schema:inLanguage "or" }
FILTER NOT EXISTS { ?item wdt:P361 ?item3 . ?w3 schema:about ?item3 . ?w3 schema:inLanguage "or" }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
}
GROUP BY ?item ?itemLabel ?year ?directorLabel ?composerLabel
ORDER BY ASC(?year)
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Odia film not in the Odia Wikipedia
SELECT
?item ?itemLabel ?year ?directorLabel ?composerLabel (COUNT(DISTINCT ?sitelink) AS ?sitelink)
WHERE{
?item wdt:P31 wd:Q11424 .
?item wdt:P364 wd:Q33810 .
OPTIONAL { ?item wdt:P577 ?date . BIND(YEAR(?date) as ?year) }
OPTIONAL { ?item wdt:P57 ?director }
OPTIONAL { ?item wdt:P86 ?composer }
FILTER NOT EXISTS { ?wfr schema:about ?item . ?wfr schema:inLanguage "or" }
FILTER NOT EXISTS { ?item wdt:P460 ?item2 . ?w2 schema:about ?item2 . ?w2 schema:inLanguage "or" }
FILTER NOT EXISTS { ?item wdt:P361 ?item3 . ?w3 schema:about ?item3 . ?w3 schema:inLanguage "or" }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
}
GROUP BY ?item ?itemLabel ?year ?directorLabel ?composerLabel
ORDER BY ASC(?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?composer")
v8("?date")
v9("?director")
v2("?item"):::projected
v5("?item2")
v3("?item3")
v12("?sitelink"):::projected
v6("?w2")
v4("?w3")
v7("?wfr")
v9("?year"):::projected
c4(["or"]):::literal
c16(["#91;AUTO_LANGUAGE#93;, en"]):::literal
c14(["bd:serviceParam"]):::iri
c7(["wd:Q11424"]):::iri
c9(["wd:Q33810"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P361"--> e0v2
e0v3 --"schema:about"--> e0v2
e0v3 --"schema:inLanguage"--> e0c4
e0v1("?item"):::projected
e0v2("?item3"):::projected
e0v3("?w3"):::projected
e0c4(["or"]):::literal
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
f0 --> v4
f0 --> c2
f0 --> c3
f0 --> c4
v2 --"wdt:P361"--> v3
v4 --"schema:about"--> v3
v4 --"schema:inLanguage"--> c4
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P460"--> e1v2
e1v3 --"schema:about"--> e1v2
e1v3 --"schema:inLanguage"--> e1c4
e1v1("?item"):::projected
e1v2("?item2"):::projected
e1v3("?w2"):::projected
e1c4(["or"]):::literal
end
f1--EXISTS--> f1e1
f1 --> v2
f1 --> c5
f1 --> v5
f1 --> v6
f1 --> c2
f1 --> c3
f1 --> c4
v2 --"wdt:P460"--> v5
v6 --"schema:about"--> v5
v6 --"schema:inLanguage"--> c4
f2[["not "]]
subgraph f2e2["Exists Clause"]
e2v1 --"schema:about"--> e2v2
e2v1 --"schema:inLanguage"--> e2c3
e2v2("?item"):::projected
e2v1("?wfr"):::projected
e2c3(["or"]):::literal
end
f2--EXISTS--> f2e2
f2 --> v7
f2 --> c2
f2 --> v2
f2 --> c3
f2 --> c4
v7 --"schema:about"--> v2
v7 --"schema:inLanguage"--> c4
v2 --"wdt:P31"--> c7
v2 --"wdt:P364"--> c9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P577".-> v8
bind3[/"year-from-dateTime(?date)"/]
v8 --o bind3
bind3 --as--o v9
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P57".-> v9
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P86".-> v10
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end
bind5[/"count(?sitelink)"/]
v12 --o bind5
bind5 --as--o v12