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
Jura1
.
Toggle Highlighting
SQL
# Search for items with specific labels # Example: term_text LIKE '% Miller' # could find people with last name "Miller" # Make sure to filter the resulting list of items for items with P31:Q5 use wikidatawiki_p; SELECT # CONCAT('Q', term_entity_id) As item, # term_text, # GROUP_CONCAT( term_language ) As lang, CONCAT('Q', term_entity_id) As item, CONCAT('D', term_language) As tr, CONCAT('"', term_text, '"') As current_desc, term_type, #CONCAT('"', term_text, '"') As current_desc, CURRENT_DATE from wb_terms WHERE term_entity_type = 'item' #AND term_type = 'label' # 'label', 'description', 'alias' AND term_type = 'description' # 'label', 'description', 'alias' AND term_language = 'en' #AND term_language in ('en', 'fr', 'it', 'de') #AND term_text LIKE 'a %' #AND term_text RLIKE '^[a-z]' AND ( term_text LIKE 'species of fungi' OR (term_text LIKE 'species of%' AND term_text LIKE '%s') ) GROUP BY term_text, term_entity_id #LIMIT 500
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...