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 cswiki_p; SELECT COUNT(*), COUNT(DISTINCT eu_page_id), COUNT(DISTINCT eu_entity_id) FROM wbc_entity_usage; SELECT page_title, eu_touched, eu_entity_id, GROUP_CONCAT(DISTINCT eu_aspect SEPARATOR ', '), eu_row_id FROM wbc_entity_usage JOIN page ON page_id = eu_page_id GROUP BY eu_touched, eu_page_id, eu_entity_id ORDER BY eu_row_id DESC LIMIT 25; SELECT page_title, eu_touched, GROUP_CONCAT(DISTINCT eu_entity_id SEPARATOR ', ') FROM wbc_entity_usage JOIN page ON page_id = eu_page_id JOIN revision ON page_latest = rev_id WHERE eu_touched = rev_timestamp GROUP BY eu_touched, eu_page_id ORDER BY COUNT(DISTINCT eu_entity_id) DESC, rev_timestamp DESC LIMIT 25; /* SELECT eu_row_id, pages.page_title, eu_touched, eu_entity_id, GROUP_CONCAT(eu_aspect), rev_timestamp FROM wbc_entity_usage JOIN page AS pages ON pages.page_id = eu_page_id JOIN revision ON page_latest = rev_id # JOIN (SELECT * FROM wikidatawiki_p.page WHERE page_namespace = 0) AS items # ON items.page_title = eu_entity_id # JOIN wikidatawiki_p.revision # ON rev_id = items.page_latest WHERE rev_timestamp = eu_touched GROUP BY eu_touched, eu_page_id, eu_entity_id ORDER BY eu_touched DESC LIMIT 25; */ 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, page_title LIMIT 50; SELECT eu_entity_id, COUNT(DISTINCT eu_page_id) FROM wbc_entity_usage GROUP BY eu_entity_id HAVING COUNT(DISTINCT eu_page_id) > 250 ORDER BY COUNT(DISTINCT eu_page_id) DESC;
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...