Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Wikidata - search for labels or descriptions
by
Jura1
This query is marked as a draft
This query has been published
by
Mr. Ibrahem
.
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 not in ('ar' ) AND term_text LIKE '%Farmer%' #AND term_text LIKE 'a %' #AND term_text RLIKE '^[a-z]' #AND ( # term_text LIKE 'Wikimedia template') GROUP BY term_text, term_entity_id LIMIT 50;
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...