Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
TEST 4
by
SR5
This query is marked as a draft
This query has been published
by
SR5
.
Toggle Highlighting
SQL
#pip install sparqlwrapper #https://rdflib.github.io/sparqlwrapper/ from SPARQLWrapper import SPARQLWrapper, JSON sparql = SPARQLWrapper("https://query.wikidata.org/sparql") sparql.setQuery("""SELECT DISTINCT ?item ?label ?sitelink WHERE { ?article schema:about ?item. ?article schema:isPartOf <https://ar.wikipedia.org/>. ?article schema:name ?sitelink. ?item rdfs:label ?label. ?item wdt:P31 wd:Q27020041. FILTER((LANG(?label)) = "ar") FILTER(?sitelink != ?label) FILTER("false"^^xsd:boolean = (CONTAINS(?sitelink, ")"))) }""") sparql.setReturnFormat(JSON) results = sparql.query().convert() for result in results["results"]["bindings"]: print(result)
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...