Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Tom.Reding
.
Toggle Highlighting
SQL
from wdqs import Client from time import sleep client = Client() classes = client.query(""" SELECT ?class ?classLabel {?class wdt:P105 wd:Q37517 . FILTER (?class NOT IN (wd:Q1390)) SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' } } """) for c in classes: species = client.query(""" SELECT (COUNT(DISTINCT ?species) AS ?count) { ?species wdt:P171+ <%s>. hint:Prior hint:gearing 'reverse' . ?species wdt:P105 wd:Q7432 . hint:Query hint:maxParallel 1000 FILTER NOT EXISTS { ?species schema:description ?itemdesc FILTER(LANG(?itemdesc) = 'en') } } """ %(c['class']) ) print("""%s species without English description: %s""" %(c['classLabel'], species[0]['count'])) sleep(1)
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...