Theklan
Joined 12 March 2013
Babel user information | ||
---|---|---|
| ||
Users by language |
Queries
editParlamentarioak legegintzaldiaren arabera antolatzeko
editSELECT ?article ("+Category:Nafarroako Parlamentuko parlamentariak IV. legealdian" AS ?command) WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,en". }
?item wdt:P39 wd:Q60226157.
VALUES ?legealdia {wd:Q117822847}
?item p:P39 ?kargua.
?kargua ps:P39 ?kargua_;
pq:P2937 ?legealdia.
?article schema:about ?item .
?article schema:inLanguage "eu" .
?article schema:isPartOf <https://eu.wikipedia.org/>
}
Mammals that are in catalan Wikipedia but not in Basque
editPREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?taxonname ?familyLabel ?orderLabel ?sitelinks ?itemLabel WHERE {
?item wdt:P31 wd:Q16521.
?item wdt:P105 wd:Q7432.
?item wdt:P225 ?taxonname.
?item wdt:P171+ wd:Q7377.
?item wdt:P171+ ?family.
?family wdt:P105 wd:Q35409.
?family wdt:P171+ ?order.
?order wdt:P105 wd:Q36602.
?item wikibase:sitelinks ?sitelinks.
?cat schema:about ?item.
?cat schema:isPartOf <https://ca.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "la,eu". }
FILTER(NOT EXISTS {
?wen schema:about ?item.
?wen schema:inLanguage "eu".
})
MINUS {?item wdt:P141 wd:Q237350.}
}
ORDER BY DESC(?sitelinks)
LIMIT 1000
Butterfly genus at enwiki but not at euwiki
editSELECT DISTINCT ?item ?taxonname ?familyLabel ?itemLabel ?taxonomic_typeLabel WHERE {
?item wdt:P31 wd:Q16521;
wdt:P105 wd:Q34740;
wdt:P225 ?taxonname;
(wdt:P171+) wd:Q28319;
(wdt:P171+) ?family.
?family wdt:P105 wd:Q35409.
?cat schema:about ?item;
schema:isPartOf <https://en.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "la,eu". }
FILTER(NOT EXISTS {
?wen schema:about ?item;
schema:inLanguage "eu".
})
?item wdt:P427 ?taxonomic_type.
}
LIMIT 300
Fungi with image not present at Basque Wikipedia ordered by number of sitelinks
editPREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?taxonname ?itemLabel ?irudia ?sitelinks WHERE {
?item wdt:P31 wd:Q16521.
?item wdt:P105 wd:Q7432.
?item wdt:P225 ?taxonname.
?item wdt:P171+ wd:Q27720.
?item wdt:P171+ ?family.
?family wdt:P105 wd:Q37517.
?item wdt:P18 ?irudia.
?item wikibase:sitelinks ?sitelinks.
?wen schema:about ?item.
?wen schema:isPartOf <https://en.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "la,eu". }
FILTER(NOT EXISTS {
?weu schema:about ?item.
?weu schema:inLanguage "eu".
})
}
ORDER BY DESC(?sitelinks)
LIMIT 100
Wikidata Query Service + QuickCategories = ♥
editSELECT ?titleEu ("+Category:Alemaniako futbolariak" AS ?command) WHERE {
hint:Query hint:optimizer "None".
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator";
wikibase:endpoint "en.wikipedia.org";
mwapi:generator "categorymembers";
mwapi:gcmtitle "Category:German_footballers";
mwapi:gcmnamespace 0;
mwapi:gcmprop "title";
mwapi:gcmlimit "max".
?titleEn_ wikibase:apiOutput mwapi:title.
}
BIND(STRLANG(?titleEn_, "en") AS ?titleEn)
?articleEn schema:name ?titleEn;
schema:isPartOf <https://en.wikipedia.org/>;
schema:about ?item.
?articleEu schema:about ?item;
schema:isPartOf <https://eu.wikipedia.org/>;
schema:name ?titleEu.
}
Copy the result, paste it into QuickCategories, submit the batch and run the commands. Try it out! --Lucas Werkmeister (eztabaida) 20:19, 29 martxoa 2019 (UTC)
- With subcategory support:
SELECT ?titleEu ("+Category:BASQUE CATEGORY HERE" AS ?command) WHERE {
hint:Query hint:optimizer "None".
SERVICE <https://query.wikidata.org/bigdata/namespace/categories/sparql> {
SERVICE mediawiki:categoryTree {
bd:serviceParam mediawiki:start <https://en.wikipedia.org/wiki/Category:ENGLISH_CATEGORY_URL_HERE>;
mediawiki:direction "Reverse";
mediawiki:depth 5 . # change this if needed
}
}
?out schema:name ?categoryEn.
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator";
wikibase:endpoint "en.wikipedia.org";
mwapi:generator "categorymembers";
mwapi:gcmtitle ?categoryEn;
mwapi:gcmnamespace 0;
mwapi:gcmprop "title";
mwapi:gcmlimit "max".
?titleEn_ wikibase:apiOutput mwapi:title.
}
BIND(STRLANG(?titleEn_, "en") AS ?titleEn)
?articleEn schema:name ?titleEn;
schema:isPartOf <https://en.wikipedia.org/>;
schema:about ?item.
?articleEu schema:about ?item;
schema:isPartOf <https://eu.wikipedia.org/>;
schema:name ?titleEu.
}
LIMIT 100
People born by year
editSELECT ?year (COUNT(?item) AS ?count)
WHERE
{
?item wdt:P19 wd:Q1598962.
?item wdt:P569 ?data.
BIND(YEAR(?data) as ?year)
}
GROUP BY ?year
Veterans and battles
editBeteranoan jaio-heriotza lekuak, guduak eta gurasoak
edit#defaultView:Map{"hide":["?rgb"],"?rgb"}
SELECT
?veteran
?veteranLabel
?veteran_
?layer
?aita
?aitaLabel
?aita_
?jaiolekua_aita_
?ama
?amaLabel
?ama_
?jaiolekua_ama_
?aitona
?aitonaLabel
?aitona_
?jaiolekua_aitona_
?gatazkaLabel
?coord
?rgb
WITH { SELECT ?veteran ?jaiolekua ?heriotza ?ama ?aita ?aitona WHERE {
?veteran wdt:P241 wd:Q11218.
?veteran wdt:P172 wd:Q126756.
?veteran wdt:P19 ?jaiolekua.
?veteran wdt:P20 ?heriotza.
?veteran wdt:P25 ?ama.
?veteran wdt:P22 ?aita.
OPTIONAL{?aita wdt:P22 ?aitona.}
} } as %i
with { select ?veteran ?veteran_ ?layer ?ama ?jaiolekua_ama_ ?coord ?rgb WHERE {
INCLUDE %i
?ama wdt:P19 ?jaiolekua_ama.
?jaiolekua_ama wdt:P625 ?coord.
?veteran rdfs:label ?veteranL . FILTER(LANG(?veteranL)="eu")
BIND(CONCAT("Beteranoa: ",?veteranL) as ?veteran_)
?jaiolekua_ama rdfs:label ?jaiolekua_amaL . FILTER(LANG(?jaiolekua_amaL)="eu")
BIND(CONCAT("Amaren jaiolekua: ",?jaiolekua_amaL) as ?jaiolekua_ama_)
BIND("3366CC" as ?rgb)
BIND("Ama" as ?layer)
} } as %j
with { select ?veteran ?veteran_ ?layer ?jaiolekua_aita_ ?aita ?coord ?rgb WHERE {
INCLUDE %i
?aita wdt:P19 ?jaiolekua_aita.
?jaiolekua_aita wdt:P625 ?coord.
?veteran rdfs:label ?veteranL . FILTER(LANG(?veteranL)="eu")
BIND(CONCAT("Beteranoa: ",?veteranL) as ?veteran_)
?jaiolekua_aita rdfs:label ?jaiolekua_aitaL . FILTER(LANG(?jaiolekua_aitaL)="eu")
BIND(CONCAT("Aitaren jaiolekua: ",?jaiolekua_aitaL) as ?jaiolekua_aita_)
BIND("FFCC33" as ?rgb)
BIND("Aita" as ?layer)
} } as %k
with { select ?veteran ?veteran_ ?heriotza ?ama_ ?aita_ ?coord ?layer ?rgb WHERE {
INCLUDE %i
?heriotza wdt:P625 ?coord.
?veteran rdfs:label ?veteranL . FILTER(LANG(?veteranL)="eu")
BIND(CONCAT("Beteranoa: ",?veteranL) as ?veteran_)
?aita rdfs:label ?aitaL . FILTER(LANG(?aitaL)="eu")
BIND(CONCAT("Aita: ",?aitaL) as ?aita_)
?ama rdfs:label ?amaL . FILTER(LANG(?amaL)="eu")
BIND(CONCAT("Ama: ",?amaL) as ?ama_)
BIND("b32425" as ?rgb)
BIND("Heriotza lekua" as ?layer)
} } as %l
with { select ?veteran ?veteran_ ?jaiolekua ?heriotza ?ama_ ?aita_ ?coord ?layer ?rgb WHERE {
INCLUDE %i
?jaiolekua wdt:P625 ?coord.
?veteran rdfs:label ?veteranL . FILTER(LANG(?veteranL)="eu")
BIND(CONCAT("Beteranoa: ",?veteranL) as ?veteran_)
?aita rdfs:label ?aitaL . FILTER(LANG(?aitaL)="eu")
BIND(CONCAT("Aita: ",?aitaL) as ?aita_)
?ama rdfs:label ?amaL . FILTER(LANG(?amaL)="eu")
BIND(CONCAT("Ama: ",?amaL) as ?ama_)
BIND("00af89" as ?rgb)
BIND("Jaiolekua" as ?layer)
} } as %m
with { select ?veteran ?gatazka ?coord ?layer ?rgb WHERE {
INCLUDE %i
?veteran wdt:P607 ?gatazka.
?gatazka wdt:P625 ?coord.
BIND("72777d" as ?rgb)
BIND("Gudua" as ?layer)
} } as %n
with { select ?veteran ?veteran_ ?layer ?jaiolekua_aitona_ ?aitona_ ?coord ?rgb WHERE {
INCLUDE %i
?veteran wdt:P22 ?aita.
?aita wdt:P22 ?aitona.
?aitona wdt:P19 ?jaiolekua_aitona.
?jaiolekua_aitona wdt:P625 ?coord.
?veteran rdfs:label ?veteranL . FILTER(LANG(?veteranL)="eu")
BIND(CONCAT("Beteranoa: ",?veteranL) as ?veteran_)
?jaiolekua_aitona rdfs:label ?jaiolekua_aitonaL . FILTER(LANG(?jaiolekua_aitonaL)="eu")
BIND(CONCAT("Aitonaren jaiolekua: ",?jaiolekua_aitonaL) as ?jaiolekua_aitona_)
BIND("FFCC00" as ?rgb)
BIND("Aitona" as ?layer)
} } as %o
WHERE {
{INCLUDE %j}
UNION
{INCLUDE %k}
UNION
{INCLUDE %l}
UNION
{INCLUDE %m}
UNION
{INCLUDE %n}
UNION
{INCLUDE %o}
SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,en,es". }
}
Alemaniako herriak estatuka
editSELECT DISTINCT ?germany ?germanyLabel ?pop WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?germany wdt:P31 wd:Q42744322;
wdt:P1082 ?pop;
(wdt:P131*) wd:Q1202.
hint:Prior hint:gearing "forward".
?germany wikibase:sitelinks ?linkcount.
FILTER(?linkcount >= 10 )
FILTER(NOT EXISTS {
?article schema:about ?germany;
schema:inLanguage "eu";
schema:isPartOf <https://eu.wikipedia.org/>.
})
}