query-402a1c3e6a5ba453390d8ff8fa85a2c3
Search for descriptions in foreign languages
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT * WHERE {
{
SELECT ?description (COUNT(DISTINCT ?item) AS ?itemsWithThisDescription) WHERE {
{
SELECT ?country ?gender ?descriptionLanguage WHERE {
BIND(wd:Q38 AS ?country) .
BIND(wd:Q6581072 AS ?gender) .
BIND('it' AS ?descriptionLanguage) .
}
}.
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?country; wdt:P21 ?gender; schema:description ?description .
FILTER(LANG(?description) = ?descriptionLanguage) .
} GROUP BY ?description ORDER BY DESC(?cnt)
}.
{
SELECT (COUNT(DISTINCT ?item) AS ?itemsWithAnyDescription) WHERE {
{
SELECT ?country ?gender ?descriptionLanguage WHERE {
BIND(wd:Q38 AS ?country) .
BIND(wd:Q6581072 AS ?gender) .
BIND('it' AS ?descriptionLanguage) .
}
}.
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?country; wdt:P21 ?gender; schema:description ?description .
FILTER(LANG(?description) = ?descriptionLanguage) .
}
}.
{
SELECT (COUNT(DISTINCT ?item) AS ?items) WHERE {
{
SELECT ?country ?gender ?descriptionLanguage WHERE {
BIND(wd:Q38 AS ?country) .
BIND(wd:Q6581072 AS ?gender) .
BIND('it' AS ?descriptionLanguage) .
}
}.
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?country; wdt:P21 ?gender .
}
}.
{
SELECT ?country ?gender ?descriptionLanguage WHERE {
BIND(wd:Q38 AS ?country) .
BIND(wd:Q6581072 AS ?gender) .
BIND('it' AS ?descriptionLanguage) .
}
}.
} ORDER BY DESC(?itemsWithThisDescription)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?cnt")
v10("?country"):::projected
v3("?description"):::projected
v10("?descriptionLanguage"):::projected
v10("?gender"):::projected
v7("?item")
v9("?items"):::projected
v8("?itemsWithAnyDescription"):::projected
v8("?itemsWithThisDescription"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
c4(["wd:Q26270618"]):::iri
f0[["?description = ?descriptionLanguage"]]
f0 --> v3
f0 --> v10
bind1[/"'wd:Q38'"/]
bind1 --as--o v10
bind2[/"'wd:Q6581072'"/]
bind2 --as--o v10
bind3[/"'it'"/]
bind3 --as--o v10
v7 --"p:P106"--> a1
a1 --"p:statement/P106"--> a2
a2 --"p:direct/P279"--> c4
v7 --"p:direct/P27"--> v10
v7 --"p:direct/P21"--> v10
v7 --"schema:description"--> v3
bind5[/"count(?item)"/]
v7 --o bind5
bind5 --as--o v8
f6[["?description = ?descriptionLanguage"]]
f6 --> v3
f6 --> v10
bind7[/"'wd:Q38'"/]
bind7 --as--o v10
bind8[/"'wd:Q6581072'"/]
bind8 --as--o v10
bind9[/"'it'"/]
bind9 --as--o v10
v7 --"p:P106"--> a3
a3 --"p:statement/P106"--> a4
a4 --"p:direct/P279"--> c4
v7 --"p:direct/P27"--> v10
v7 --"p:direct/P21"--> v10
v7 --"schema:description"--> v3
bind11[/"count(?item)"/]
v7 --o bind11
bind11 --as--o v8
bind12[/"'wd:Q38'"/]
bind12 --as--o v10
bind13[/"'wd:Q6581072'"/]
bind13 --as--o v10
bind14[/"'it'"/]
bind14 --as--o v10
v7 --"p:P106"--> a5
a5 --"p:statement/P106"--> a6
a6 --"p:direct/P279"--> c4
v7 --"p:direct/P27"--> v10
v7 --"p:direct/P21"--> v10
bind16[/"count(?item)"/]
v7 --o bind16
bind16 --as--o v9
bind17[/"'wd:Q38'"/]
bind17 --as--o v10
bind18[/"'wd:Q6581072'"/]
bind18 --as--o v10
bind19[/"'it'"/]
bind19 --as--o v10