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
RaymondYee
.
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries#First_messages_to_users.2C_by_tool.2Fbot_used_.28if_any.29
Toggle Highlighting
SQL
SET @user_name = 'RaymondYee'; USE enwiki_p; SELECT page_id, page_title, rev_comment,rev_user, rev_user_text, CAST(rev_timestamp AS datetime) AS rev_timestamp, CAST(user_registration AS datetime) AS user_registration, datediff(rev_timestamp,user_registration) AS datediff_msg_reg, timediff(rev_timestamp,user_registration) AS timediff_msg_reg, DATE_FORMAT(user_registration,"%Y-%m-%d") AS user_reg_ymd, DATE_FORMAT(rev_timestamp,"%Y-%m-%d") AS first_msg_ymd, user_id, (rev_comment LIKE '%WP:HG%' OR rev_comment LIKE '%WP:HUGGLE%') AS huggle, (rev_comment LIKE '%WP:TW%') tw, (rev_comment LIKE '%igloo|GLOO]]%') AS gloo, (rev_comment LIKE '%WP:STiki%') AS stiki, (rev_user_text LIKE 'ClueBot%') AS cluebot, (rev_user_text = 'XLinkBot') AS xlinkbot, (rev_user_text = 'CorenSearchBot') AS corenbot, (rev_user_text LIKE 'BetacommandBot%') AS betacommandbot, (rev_user_text LIKE '%Bot') AS bot, (rev_user_text LIKE page_title) AS SELF FROM page LEFT JOIN revision ON page_id = rev_page LEFT JOIN user ON REPLACE(page_title,"_"," ") = @user_name WHERE page_namespace = 3 AND LOCATE('/',page_title) = 0 GROUP BY page_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...