query-0508d3fe16eeeac653412804771d35c6

rq turtle/ttl

Forked from query by User:Gnoeee

Males without Malayalam labels in Wikidata

SELECT ?item ?len ?lml ?itemLabel ?itemDescription WHERE { ?item wdt:P31 wd:Q5; wdt:P21 wd:Q6581097; wdt:P27 wd:Q668. OPTIONAL { ?item rdfs:label ?len. FILTER((LANG(?len)) = "en") } FILTER(NOT EXISTS { ?item rdfs:label ?lml. FILTER((LANG(?lml)) = "ml") }) SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } SERVICE wikibase:label { bd:serviceParam wikibase:language "ml". } } 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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Forked from query by User:Gnoeee
# Males without Malayalam labels in Wikidata
SELECT ?item ?len ?lml ?itemLabel ?itemDescription WHERE {
  ?item wdt:P31 wd:Q5;
    wdt:P21 wd:Q6581097;
    wdt:P27 wd:Q668.
  OPTIONAL {
    ?item rdfs:label ?len.
    FILTER((LANG(?len)) = "en")
  }
  FILTER(NOT EXISTS {
    ?item rdfs:label ?lml.
    FILTER((LANG(?lml)) = "ml")
  })
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ml". }
}
LIMIT 2000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?len"):::projected v1("?lml"):::projected c11(["bd:serviceParam"]):::iri c9(["wd:Q668"]):::iri c5(["wd:Q5"]):::iri c7(["wd:Q6581097"]):::iri c3(["en"]):::literal c1(["ml"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?lml = 'ml'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?item"):::projected e0v1("?lml"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?lml = 'ml'"]] f1 --> v1 v2 --"rdfs:label"--> v1 v2 --"wdt:P31"--> c5 v2 --"wdt:P21"--> c7 v2 --"wdt:P27"--> c9 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c1 end