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, CURRENT_DATE from wb_terms WHERE term_entity_type = 'item' AND term_language = 'en' AND term_type = 'label' #AND term_text LIKE '% Jones' AND term_text RLIKE '^[a-z]' GROUP BY term_text, term_entity_id
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...