query-28c6739cad4bebd6d249b13e4250cada

rq turtle/ttl

Malayalam film with an article on the en Wiki but not on the ml Wiki SELECT ?movie ?movieLabel (COUNT(DISTINCT ?sitelink) AS ?count) WHERE { ?movie wdt:P31 wd:Q11424; wdt:P364 wd:Q36236. ?sitelink schema:about ?movie. FILTER(EXISTS { ?wen schema:about ?movie; schema:inLanguage "en". }) FILTER(NOT EXISTS { ?wor schema:about ?movie; schema:inLanguage "ml". }) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?movie ?movieLabel ORDER BY DESC (?count) LIMIT 2000

Use at

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#>
# Malayalam film with an article on the en Wiki but not on the ml Wiki
SELECT ?movie ?movieLabel (COUNT(DISTINCT ?sitelink) AS ?count) WHERE {
  ?movie wdt:P31 wd:Q11424;
    wdt:P364 wd:Q36236.
  ?sitelink schema:about ?movie.
  FILTER(EXISTS {
    ?wen schema:about ?movie;
      schema:inLanguage "en".
  })
  FILTER(NOT EXISTS {
    ?wor schema:about ?movie;
      schema:inLanguage "ml".
  })
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?movie ?movieLabel
ORDER BY DESC (?count)
LIMIT 2000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count") v3("?movie"):::projected v5("?sitelink"):::projected v4("?wen") v2("?wor") c8(["wd:Q36236"]):::iri c10(["bd:serviceParam"]):::iri c4(["en"]):::literal c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q11424"]):::iri c3(["ml"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:inLanguage"--> e0c3 e0v2("?movie"):::projected e0v1("?wor"):::projected e0c3(["ml"]):::literal end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 f0 --> c2 f0 --> c3 v2 --"schema:about"--> v3 v2 --"schema:inLanguage"--> c3 f1[[" "]] subgraph f1e1["Exists Clause"] e1v1 --"schema:about"--> e1v2 e1v1 --"schema:inLanguage"--> e1c3 e1v2("?movie"):::projected e1v1("?wen"):::projected e1c3(["en"]):::literal end f1--EXISTS--> f1e1 f1 --> v4 f1 --> c1 f1 --> v3 f1 --> c2 f1 --> c4 v4 --"schema:about"--> v3 v4 --"schema:inLanguage"--> c4 v3 --"wdt:P31"--> c6 v3 --"wdt:P364"--> c8 v5 --"schema:about"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind3[/"count(?sitelink)"/] v5 --o bind3 bind3 --as--o v6