Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Time between page creation and first flag event (for certain user)
by
Kanzat
This query is marked as a draft
This query has been published
by
Kanzat
.
Should count deleted pages... not sure
Toggle Highlighting
SQL
USE ukwiki_p; SELECT tbl0.fr_rev_id, tbl5.rev_timestamp as 'First edit', tbl0.fr_timestamp as 'First patrol', TIMESTAMPDIFF(SECOND, tbl5.rev_timestamp, tbl0.fr_timestamp) as 'Time diff', tbl0.fr_timestamp, page.page_title FROM flaggedrevs tbl0 INNER JOIN ( SELECT fr_page_id, fr_rev_id FROM flaggedrevs LEFT JOIN user ON fr_user = user_id WHERE user_name = 'Xsandriel' AND fr_flags NOT LIKE '%auto%' GROUP BY fr_page_id HAVING MIN(fr_rev_id) ) tbl1 ON tbl0.fr_rev_id = tbl1.fr_rev_id INNER JOIN ( SELECT rev_page, rev_timestamp FROM revision GROUP BY rev_page HAVING MIN(rev_timestamp) UNION SELECT ar_page_id, ar_timestamp FROM archive GROUP BY ar_page_id HAVING MIN(ar_timestamp) ) tbl5 ON tbl0.fr_page_id = tbl5.rev_page LEFT JOIN page ON tbl0.fr_page_id = page_id WHERE page_namespace = 0 OR page_namespace is null AND NOT EXISTS ( SELECT * FROM flaggedrevs tbl3 WHERE tbl3.fr_page_id = tbl0.fr_page_id AND tbl3.fr_timestamp < tbl0.fr_timestamp ) ORDER BY TIMESTAMPDIFF(SECOND, tbl5.rev_timestamp, tbl0.fr_timestamp) ASC;
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...