query-f20586aa3ef8bce5973c877765999109
title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang title:Non-English labels for Khalili Collections items SELECT ?lang ?count WITH { SELECT ?work ?label WHERE { ?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections ?work (rdfs:label|skos:altLabel) ?label FILTER(lang(?label) != "en") } } AS %core WHERE { { SELECT ?lang (COUNT(?label) AS ?count) WHERE { INCLUDE %core. BIND(lang(?label) AS ?langcode). OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")} BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang) } GROUP BY ?lang } UNION { SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE { INCLUDE %core. } } } order BY DESC(?count) ?lang
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#title:Non-English labels for Khalili Collections items
SELECT ?lang ?count WHERE { {
SELECT ?lang (COUNT(?label) AS ?count) WHERE {
{
SELECT ?work ?label WHERE {
?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections
?work (rdfs:label|skos:altLabel) ?label
FILTER(lang(?label) != "en") } }
BIND(lang(?label) AS ?langcode).
OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")}
BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang)
} GROUP BY ?lang
} UNION {
SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE {
{
SELECT ?work ?label WHERE {
?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections
?work (rdfs:label|skos:altLabel) ?label
FILTER(lang(?label) != "en") } }
} }
} order BY DESC(?count) ?lang
Query found at
- https://www.wikidata.org/wiki/User:MartinPoulter/queries/khalili
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/cs
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/es
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/fr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/ja
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/nl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/pl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/maintenance/uk