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
Matěj Suchánek
.
Toggle Highlighting
SQL
USE wikidatawiki_p; SELECT * FROM wb_changes JOIN revision ON rev_id = change_revision_id LIMIT 10; SELECT ips_site_page, page_title, rev_timestamp FROM (SELECT * FROM wb_changes_subscription WHERE cs_subscriber_id = 'cswiki') AS changes JOIN page ON page_title = changes.cs_entity_id JOIN wb_entity_per_page ON epp_page_id = page_id JOIN wb_items_per_site ON ips_item_id = epp_entity_id AND ips_site_id = cs_subscriber_id JOIN revision ON rev_id = page_latest ORDER BY page_latest DESC LIMIT 50; USE cswiki_p; SELECT COUNT(*) FROM wbc_entity_usage; SELECT * FROM wbc_entity_usage ORDER BY eu_row_id DESC LIMIT 10; SELECT eu_aspect FROM wbc_entity_usage GROUP BY eu_aspect; /* SELECT eu_row_id, page_title, eu_entity_id, eu_touched #, COUNT(DISTINCT eu_entity_id) FROM wbc_entity_usage JOIN page ON page_id = eu_page_id #GROUP BY eu_page_id ORDER BY eu_row_id DESC LIMIT 50; SELECT eu_entity_id, change_time, GROUP_CONCAT(DISTINCT page2.page_title SEPARATOR ', ') FROM wikidatawiki_p.wb_changes JOIN (SELECT * FROM wikidatawiki_p.user WHERE user_name = "Matěj Suchánek") AS user ON user.user_id = change_user_id JOIN wikidatawiki_p.revision ON rev_id = change_revision_id JOIN wikidatawiki_p.page AS page1 ON page1.page_id = rev_page JOIN wbc_entity_usage ON eu_entity_id = page1.page_title JOIN (SELECT * FROM page WHERE page_namespace = 0) AS page2 ON page2.page_id = eu_page_id GROUP BY eu_entity_id ORDER BY change_time DESC LIMIT 50; SELECT page_title, COUNT(DISTINCT eu_entity_id), COUNT(eu_aspect), eu_touched FROM wbc_entity_usage JOIN page ON page_id = eu_page_id GROUP BY eu_page_id ORDER BY COUNT(DISTINCT eu_entity_id) DESC, COUNT(eu_aspect) DESC 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...