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
Balajijagadesh
.
Toggle Highlighting
SQL
-- Set the database to Tamil Wikipedia USE tawiki_p; -- Task 1: Total number of registered users with more than 5 edits SELECT COUNT(DISTINCT user.user_id) AS registered_users_with_more_than_5_edits FROM user JOIN revision ON user.user_id = revision.rev_user WHERE user.user_registration IS NOT NULL GROUP BY user.user_id HAVING COUNT(revision.rev_id) > 5; -- Task 2: Total number of pages in namespace 0 SELECT COUNT(*) AS total_pages_in_ns0 FROM page WHERE page_namespace = 0; -- Task 3: Top 100 users with the number of pages they have created in namespace 0 SELECT user.user_name, COUNT(*) AS pages_created FROM page JOIN revision ON page.page_id = revision.rev_page JOIN user ON revision.rev_user = user.user_id WHERE page_namespace = 0 AND page_is_redirect = 0 GROUP BY user.user_name ORDER BY pages_created DESC LIMIT 100;
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...