User:MarioGom

From Wikidata
Jump to navigation Jump to search

Queries[edit]

Countries with Wikipedia article in Catalonian and Euskera but not in Spanish[edit]

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?linkCount ?wca ?weu
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q6256 .
  ?item wikibase:sitelinks ?linkCount .
  ?weu schema:about ?item .
  ?weu schema:inLanguage "eu" .
  ?wca schema:about ?item .
  ?wca schema:inLanguage "ca" .
  OPTIONAL { ?wes schema:about ?item . ?wes schema:inLanguage "es" }
  FILTER (!BOUND(?wes))
  #OPTIONAL { ?wen schema:about ?item . ?wen schema:inLanguage "en" }
  #FILTER (!BOUND(?wen))
}

Try it!

Left-wing entities with no Wikipedia article in Spanish ordered by linkcount[edit]

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?linkCount ?wen
WHERE
{
  ?item wdt:P1142*/wdt:P1387*/wdt:P361* wd:Q164597 .
  ?item wikibase:sitelinks ?linkCount .
  OPTIONAL { ?wen schema:about ?item . ?wen schema:inLanguage "en" . ?wen schema:isPartOf <https://en.wikipedia.org/> . }
  OPTIONAL { ?wes schema:about ?item . ?wes schema:inLanguage "es" }
  FILTER (!BOUND(?wes))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,pt,fr,it,ca" }
}
ORDER BY DESC(?linkCount)

Try it!

Marxist women in English Wikipedia not present in Spanish Wikipedia[edit]

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?linkCount
WHERE
{
  ?item wdt:P21 wd:Q6581072 .
  ?item wdt:P102*/wdt:P1142*/wdt:P1387*/wdt:P361* wd:Q7264 .
  ?item wikibase:sitelinks ?linkCount .
  ?wen schema:about ?item .
  ?wen schema:inLanguage "en" .
  ?wen schema:isPartOf <https://en.wikipedia.org/> .
  OPTIONAL { ?wes schema:about ?item . ?wes schema:inLanguage "es" }
  FILTER (!BOUND(?wes))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,pt,fr,it,ca" }
}
ORDER BY DESC(?linkCount)

Try it!

All items related to Marxism ordered by linkcount[edit]

# Items related to marxism.
#
# NOTE: Results include articles about people that is
#       barely related to marxism or that is plainly
#       anti-marxism. Take them with a grain of salt.

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?linkCount
WHERE
{
  ?item (wdt:P102|wdt:P1142|wdt:P1387|wdt:P361|wdt:P1269|wdt:P31)+ wd:Q7264 .
  ?item wikibase:sitelinks ?linkCount .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,it,es" }
}
ORDER BY DESC(?linkCount)

Try it!

People born in the XX century with a Featured Article in Spanish[edit]

PREFIX schema: <http://schema.org/>

SELECT ?sitelink ?itemLabel ?birthyear WHERE {
  ?item wdt:P31 wd:Q5.
  ?item wdt:P569 ?birth.
  BIND(YEAR(?birth) as ?birthyear).
  ?sitelink schema:isPartOf <https://es.wikipedia.org/>.
  ?sitelink schema:about ?item.
  ?sitelink wikibase:badge wd:Q17437796.
  FILTER (?birthyear >= 1900).
  FILTER (?birthyear < 2000).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
}
ORDER BY ?itemLabel

Try it!

People killed by law enforcement agencies[edit]

SELECT ?human ?humanLabel
WHERE {
  ?human wdt:P157 ?killer.
  ?killer (wdt:P31/wdt:P279*) wd:Q732717
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Try it!

Organizations funded by the National Endowment for Democracy[edit]

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?linkCount
WHERE
{
  ?item (wdt:P859|wdt:P1962)* wd:Q1422577 .
  ?item wikibase:sitelinks ?linkCount .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,pt,fr,it,ca,es" }
}
ORDER BY DESC(?linkCount)

Try it!

Wikimedia benefactors[edit]

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?linkCount
WHERE
{
  wd:Q180 wdt:P859 ?item .
  ?item wikibase:sitelinks ?linkCount .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,pt,fr,it,ca" }
}
ORDER BY DESC(?linkCount)

Try it!